Skip to content

Commit 1ee8d22

Browse files
committed
build: pass along more variables to the subonfigure
Explicitly call out the CPU/OS that are building for. Pass along the ICU, CURL, and libxml2 library/headers to the subconfgiure. This is particularly helpful for cross-compilation where the configuration is being pass through via the commandline or through CMake caches.
1 parent 50b7086 commit 1ee8d22

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,19 @@ ExternalProject_Add(CoreFoundation
4040
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
4141
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
4242
-DCMAKE_INSTALL_LIBDIR=usr/lib
43+
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
44+
-DCMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}
45+
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
4346
-DCF_DEPLOYMENT_SWIFT=YES
4447
-DCF_ENABLE_LIBDISPATCH=${FOUNDATION_ENABLE_LIBDISPATCH}
4548
-DCF_PATH_TO_LIBDISPATCH_SOURCE=${FOUNDATION_PATH_TO_LIBDISPATCH_SOURCE}
4649
-DCF_PATH_TO_LIBDISPATCH_BUILD=${FOUNDATION_PATH_TO_LIBDISPATCH_BUILD}
50+
-DICU_LIBRARY=${ICU_LIBRARY}
4751
-DICU_INCLUDE_DIR=${ICU_INCLUDE_DIR}
52+
-DCURL_LIBRARY=${CURL_LIBRARY}
53+
-DCURL_INCLUDE_DIR=${CURL_INCLUDE_DIR}
54+
-DLIBXML2_LIBRARY=${LIBXML2_LIBRARY}
55+
-DLIBXML2_INCLUDE_DIR=${LIBXML2_INCLUDE_DIR}
4856
INSTALL_COMMAND
4957
${CMAKE_COMMAND} -E env --unset=DESTDIR ${CMAKE_COMMAND} --build . --target install)
5058
ExternalProject_Get_Property(CoreFoundation install_dir)

0 commit comments

Comments
 (0)