Skip to content

Commit

Permalink
Android: build: specify CMake vars as CACHE vars
Browse files Browse the repository at this point in the history
So they don't get overridden by subprojects.
  • Loading branch information
bk138 committed Dec 5, 2023
1 parent cee3c66 commit 0ad8e68
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions android/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ set(libjpeg_build_DIR ${CMAKE_BINARY_DIR}/libjpeg)
# adds a source subdir with specifying a build output dir
add_subdirectory(${libjpeg_src_DIR} ${libjpeg_build_DIR})
# set these variables so FindJPEG can find the library
set(JPEG_LIBRARY ${libjpeg_build_DIR}/libturbojpeg.a)
set(JPEG_INCLUDE_DIR ${libjpeg_src_DIR})
set(JPEG_LIBRARY ${libjpeg_build_DIR}/libturbojpeg.a CACHE FILEPATH "")
set(JPEG_INCLUDE_DIR ${libjpeg_src_DIR} CACHE PATH "")
# set include directories so dependent code can find the headers
include_directories(
${libjpeg_src_DIR}
Expand All @@ -34,9 +34,9 @@ set(libssl_build_DIR ${CMAKE_BINARY_DIR}/libssl)
# adds a source subdir with specifying a build output dir
add_subdirectory(${libssl_src_DIR} ${libssl_build_DIR})
# set these variables so Findssl can find the library
set(OPENSSL_SSL_LIBRARY ${libssl_build_DIR}/ssl/libssl.a)
set(OPENSSL_CRYPTO_LIBRARY ${libssl_build_DIR}/crypto/libcrypto.a)
set(OPENSSL_INCLUDE_DIR ${libssl_src_DIR}/include)
set(OPENSSL_SSL_LIBRARY ${libssl_build_DIR}/ssl/libssl.a CACHE FILEPATH "")
set(OPENSSL_CRYPTO_LIBRARY ${libssl_build_DIR}/crypto/libcrypto.a CACHE FILEPATH "")
set(OPENSSL_INCLUDE_DIR ${libssl_src_DIR}/include CACHE PATH "")
# set include directories so dependent code can find the headers
include_directories(
${libssl_src_DIR}/include
Expand All @@ -50,8 +50,8 @@ set(libssh2_build_DIR ${CMAKE_BINARY_DIR}/libssh2)
# adds a source subdir with specifying a build output dir
add_subdirectory(${libssh2_src_DIR} ${libssh2_build_DIR})
# set these variables so FindLibSSH2 can find the library
set(LIBSSH2_LIBRARY ${libssh2_build_DIR}/src/libssh2.a)
set(LIBSSH2_INCLUDE_DIR ${libssh2_src_DIR}/include)
set(LIBSSH2_LIBRARY ${libssh2_build_DIR}/src/libssh2.a CACHE FILEPATH "")
set(LIBSSH2_INCLUDE_DIR ${libssh2_src_DIR}/include CACHE PATH "")
# set include directories so dependent code can find the headers
include_directories(
${libssh2_src_DIR}/include
Expand Down

0 comments on commit 0ad8e68

Please sign in to comment.