summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindCpluff.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'project/cmake/modules/FindCpluff.cmake')
-rw-r--r--project/cmake/modules/FindCpluff.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/project/cmake/modules/FindCpluff.cmake b/project/cmake/modules/FindCpluff.cmake
index fb2bb25..ce6c127 100644
--- a/project/cmake/modules/FindCpluff.cmake
+++ b/project/cmake/modules/FindCpluff.cmake
@@ -10,6 +10,13 @@ if(NOT WIN32)
10 string(REPLACE ";" " " defines "${CMAKE_C_FLAGS} ${SYSTEM_DEFINES} -I${EXPAT_INCLUDE_DIR}") 10 string(REPLACE ";" " " defines "${CMAKE_C_FLAGS} ${SYSTEM_DEFINES} -I${EXPAT_INCLUDE_DIR}")
11 get_filename_component(expat_dir ${EXPAT_LIBRARY} DIRECTORY) 11 get_filename_component(expat_dir ${EXPAT_LIBRARY} DIRECTORY)
12 set(ldflags "-L${expat_dir}") 12 set(ldflags "-L${expat_dir}")
13
14 # iOS: Without specifying -arch, configure tries to use /bin/cpp as C-preprocessor
15 # http://stackoverflow.com/questions/38836754/cant-cross-compile-c-library-for-arm-ios
16 if(CORE_SYSTEM_NAME STREQUAL ios)
17 set(cppflags "-arch ${CPU}")
18 endif()
19
13 ExternalProject_Add(libcpluff SOURCE_DIR ${CORE_SOURCE_DIR}/lib/cpluff 20 ExternalProject_Add(libcpluff SOURCE_DIR ${CORE_SOURCE_DIR}/lib/cpluff
14 BUILD_IN_SOURCE 1 21 BUILD_IN_SOURCE 1
15 PREFIX ${CORE_BUILD_DIR}/cpluff 22 PREFIX ${CORE_BUILD_DIR}/cpluff
@@ -22,6 +29,7 @@ if(NOT WIN32)
22 --libdir=<INSTALL_DIR>/lib 29 --libdir=<INSTALL_DIR>/lib
23 --host=${ARCH} 30 --host=${ARCH}
24 CFLAGS=${defines} 31 CFLAGS=${defines}
32 CPPFLAGS=${cppflags}
25 LDFLAGS=${ldflags}) 33 LDFLAGS=${ldflags})
26 ExternalProject_Add_Step(libcpluff autoreconf 34 ExternalProject_Add_Step(libcpluff autoreconf
27 DEPENDEES download update patch 35 DEPENDEES download update patch