summaryrefslogtreecommitdiff
path: root/Depends-Android.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Depends-Android.cmake')
-rw-r--r--Depends-Android.cmake31
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 @@
1if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/lib/the_Foundation/.git)
2 message (FATAL_ERROR "'lib/the_Foundation' Git submodule not found")
3endif ()
4
5# the_Foundation is checked out as a submodule, make sure it's up to date.
6find_package (Git)
7if (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 ()
17endif ()
18
19set (INSTALL_THE_FOUNDATION OFF)
20set (TFDN_STATIC_LIBRARY ON CACHE BOOL "")
21set (TFDN_ENABLE_INSTALL OFF CACHE BOOL "")
22set (TFDN_ENABLE_TESTS OFF CACHE BOOL "")
23set (TFDN_ENABLE_WEBREQUEST OFF CACHE BOOL "")
24add_subdirectory (lib/the_Foundation)
25add_library (the_Foundation::the_Foundation ALIAS the_Foundation)
26if (NOT OPENSSL_FOUND)
27 message (FATAL_ERROR "Lagrange requires OpenSSL for TLS. Please check if pkg-config can find 'openssl'.")
28endif ()
29if (NOT ZLIB_FOUND)
30 message (FATAL_ERROR "Lagrange requires zlib for reading compressed archives. Please check if pkg-config can find 'zlib'.")
31endif () \ No newline at end of file