From 1e5bdca69f7676b2dbcd64f0f44f31b12b337b7c Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 13 Dec 2016 13:45:04 +0100 Subject: sync with upstream --- project/cmake/modules/FindCpluff.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'project/cmake/modules/FindCpluff.cmake') 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) string(REPLACE ";" " " defines "${CMAKE_C_FLAGS} ${SYSTEM_DEFINES} -I${EXPAT_INCLUDE_DIR}") get_filename_component(expat_dir ${EXPAT_LIBRARY} DIRECTORY) set(ldflags "-L${expat_dir}") + + # iOS: Without specifying -arch, configure tries to use /bin/cpp as C-preprocessor + # http://stackoverflow.com/questions/38836754/cant-cross-compile-c-library-for-arm-ios + if(CORE_SYSTEM_NAME STREQUAL ios) + set(cppflags "-arch ${CPU}") + endif() + ExternalProject_Add(libcpluff SOURCE_DIR ${CORE_SOURCE_DIR}/lib/cpluff BUILD_IN_SOURCE 1 PREFIX ${CORE_BUILD_DIR}/cpluff @@ -22,6 +29,7 @@ if(NOT WIN32) --libdir=/lib --host=${ARCH} CFLAGS=${defines} + CPPFLAGS=${cppflags} LDFLAGS=${ldflags}) ExternalProject_Add_Step(libcpluff autoreconf DEPENDEES download update patch -- cgit v1.2.3