diff options
Diffstat (limited to 'Depends-Android.cmake')
-rw-r--r-- | Depends-Android.cmake | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Depends-Android.cmake b/Depends-Android.cmake new file mode 100644 index 00000000..74635620 --- /dev/null +++ b/Depends-Android.cmake | |||
@@ -0,0 +1,31 @@ | |||
1 | if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/lib/the_Foundation/.git) | ||
2 | message (FATAL_ERROR "'lib/the_Foundation' Git submodule not found") | ||
3 | endif () | ||
4 | |||
5 | # the_Foundation is checked out as a submodule, make sure it's up to date. | ||
6 | find_package (Git) | ||
7 | if (GIT_FOUND) | ||
8 | execute_process ( | ||
9 | COMMAND ${GIT_EXECUTABLE} submodule update | ||
10 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
11 | OUTPUT_VARIABLE subout | ||
12 | OUTPUT_STRIP_TRAILING_WHITESPACE | ||
13 | ) | ||
14 | if (subout) | ||
15 | message (FATAL_ERROR "'lib/the_Foundation' Git submodule has been updated, please re-run CMake.\n") | ||
16 | endif () | ||
17 | endif () | ||
18 | |||
19 | set (INSTALL_THE_FOUNDATION OFF) | ||
20 | set (TFDN_STATIC_LIBRARY ON CACHE BOOL "") | ||
21 | set (TFDN_ENABLE_INSTALL OFF CACHE BOOL "") | ||
22 | set (TFDN_ENABLE_TESTS OFF CACHE BOOL "") | ||
23 | set (TFDN_ENABLE_WEBREQUEST OFF CACHE BOOL "") | ||
24 | add_subdirectory (lib/the_Foundation) | ||
25 | add_library (the_Foundation::the_Foundation ALIAS the_Foundation) | ||
26 | if (NOT OPENSSL_FOUND) | ||
27 | message (FATAL_ERROR "Lagrange requires OpenSSL for TLS. Please check if pkg-config can find 'openssl'.") | ||
28 | endif () | ||
29 | if (NOT ZLIB_FOUND) | ||
30 | message (FATAL_ERROR "Lagrange requires zlib for reading compressed archives. Please check if pkg-config can find 'zlib'.") | ||
31 | endif () \ No newline at end of file | ||