diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-11 19:16:43 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-23 13:28:50 +0200 |
commit | 5d94fa0053adf3281dfc5ccde123e3f322d346a2 (patch) | |
tree | bc9252be9ddf165f532d73dac5ecf6979299e32a /CMakeLists.txt | |
parent | d2aff7411994d66e216b8e6ee55a29e38e715e19 (diff) |
Android: Setting up the build
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ba63bf78..0d094ea7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -217,7 +217,7 @@ set (SOURCES | |||
217 | src/ui/scrollwidget.c | 217 | src/ui/scrollwidget.c |
218 | src/ui/scrollwidget.h | 218 | src/ui/scrollwidget.h |
219 | src/ui/sidebarwidget.c | 219 | src/ui/sidebarwidget.c |
220 | src/ui/sidebarwidget.h | 220 | src/ui/sidebarwidget.h |
221 | src/ui/text.c | 221 | src/ui/text.c |
222 | src/ui/text.h | 222 | src/ui/text.h |
223 | src/ui/touch.c | 223 | src/ui/touch.c |
@@ -307,7 +307,12 @@ else () | |||
307 | endif () | 307 | endif () |
308 | 308 | ||
309 | # Target. | 309 | # Target. |
310 | add_executable (app ${SOURCES} ${RESOURCES} ${EMB_FONTS}) | 310 | if (NOT ANDROID) |
311 | add_executable (app ${SOURCES} ${RESOURCES} ${EMB_FONTS}) | ||
312 | else () | ||
313 | # The whole app becomes one shared library, based on this static one. | ||
314 | add_library (app STATIC ${SOURCES}) | ||
315 | endif () | ||
311 | set_property (TARGET app PROPERTY C_STANDARD 11) | 316 | set_property (TARGET app PROPERTY C_STANDARD 11) |
312 | if (TARGET ext-deps) | 317 | if (TARGET ext-deps) |
313 | add_dependencies (app ext-deps) | 318 | add_dependencies (app ext-deps) |
@@ -414,7 +419,7 @@ if (APPLE) | |||
414 | XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "fi.skyjake.lagrange" | 419 | XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "fi.skyjake.lagrange" |
415 | ) | 420 | ) |
416 | if (IOS) | 421 | if (IOS) |
417 | target_compile_definitions (app PUBLIC | 422 | target_compile_definitions (app PUBLIC |
418 | LAGRANGE_IOS_VERSION="${IOS_BUNDLE_VERSION}" | 423 | LAGRANGE_IOS_VERSION="${IOS_BUNDLE_VERSION}" |
419 | LAGRANGE_IOS_BUILD_DATE="${IOS_BUILD_DATE}" | 424 | LAGRANGE_IOS_BUILD_DATE="${IOS_BUILD_DATE}" |
420 | ) | 425 | ) |
@@ -437,7 +442,7 @@ endif () | |||
437 | if (MSYS) | 442 | if (MSYS) |
438 | target_link_libraries (app PUBLIC d2d1 uuid dwmapi) # querying DPI | 443 | target_link_libraries (app PUBLIC d2d1 uuid dwmapi) # querying DPI |
439 | if (ENABLE_WINSPARKLE) | 444 | if (ENABLE_WINSPARKLE) |
440 | target_link_libraries (app PUBLIC winsparkle) | 445 | target_link_libraries (app PUBLIC winsparkle) |
441 | endif () | 446 | endif () |
442 | endif () | 447 | endif () |
443 | if (UNIX) | 448 | if (UNIX) |