Mercurial > dwindows
comparison android/CMakeLists.txt @ 2473:aa420e366b2b
Android: Initial skeletal commit for Android support, almost nothing implemented...
but this should be a framework for adding Android support via JNI/NDK.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 18 Apr 2021 01:28:55 +0000 |
parents | |
children | a13e6db064f4 |
comparison
equal
deleted
inserted
replaced
2472:206a0643add6 | 2473:aa420e366b2b |
---|---|
1 # For more information about using CMake with Android Studio, read the | |
2 # documentation: https://d.android.com/studio/projects/add-native-code.html | |
3 | |
4 # Sets the minimum version of CMake required to build the native library. | |
5 | |
6 cmake_minimum_required(VERSION 3.10.2) | |
7 | |
8 # Declares and names the project. | |
9 | |
10 project("dwtest") | |
11 | |
12 # Creates and names a library, sets it as either STATIC | |
13 # or SHARED, and provides the relative paths to its source code. | |
14 # You can define multiple libraries, and CMake builds them for you. | |
15 # Gradle automatically packages shared libraries with your APK. | |
16 | |
17 add_library( # Sets the name of the library. | |
18 dwindows | |
19 | |
20 # Sets the library as a shared library. | |
21 SHARED | |
22 | |
23 # Provides a relative path to your source file(s). | |
24 dw.cpp ) | |
25 | |
26 # Searches for a specified prebuilt library and stores the path as a | |
27 # variable. Because CMake includes system libraries in the search path by | |
28 # default, you only need to specify the name of the public NDK library | |
29 # you want to add. CMake verifies that the library exists before | |
30 # completing its build. | |
31 | |
32 find_library( # Sets the name of the path variable. | |
33 log-lib | |
34 | |
35 # Specifies the name of the NDK library that | |
36 # you want CMake to locate. | |
37 log ) | |
38 | |
39 # Specifies libraries CMake should link to your target library. You | |
40 # can link multiple libraries, such as libraries you define in this | |
41 # build script, prebuilt third-party libraries, or system libraries. | |
42 | |
43 target_link_libraries( # Specifies the target library. | |
44 dwindows | |
45 | |
46 # Links the target library to the log library | |
47 # included in the NDK. | |
48 ${log-lib} ) |