Skip to content

Instantly share code, notes, and snippets.

@manuelm
Created February 19, 2015 01:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manuelm/c44cfb75ac6eed65e19c to your computer and use it in GitHub Desktop.
Save manuelm/c44cfb75ac6eed65e19c to your computer and use it in GitHub Desktop.
diff --git a/project/cmake/scripts/common/handle-depends.cmake b/project/cmake/scripts/common/handle-depends.cmake
index 255889a..ce88eb8 100644
--- a/project/cmake/scripts/common/handle-depends.cmake
+++ b/project/cmake/scripts/common/handle-depends.cmake
@@ -85,11 +85,13 @@ function(add_addon_depends addon searchpath)
-DENABLE_STATIC=1
-DBUILD_SHARED_LIBS=0)
# if there are no make rules override files available take care of manually passing on ARCH_DEFINES
- # TODO: figure out if we should use -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} ${ARCH_DEFINES}" and why it doesn't work
# TODO: figure out why this doesn't work for OSX32 and IOS/ATV2
if(NOT CMAKE_USER_MAKE_RULES_OVERRIDE AND NOT CMAKE_USER_MAKE_RULES_OVERRIDE_CXX AND NOT APPLE)
- list(APPEND BUILD_ARGS -DCMAKE_C_FLAGS=${ARCH_DEFINES}
- -DCMAKE_CXX_FLAGS=${ARCH_DEFINES})
+ # make sure we create strings, not lists
+ set(TMP_C_FLAGS "${CMAKE_C_FLAGS} ${ARCH_DEFINES}")
+ set(TMP_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_DEFINES}")
+ list(APPEND BUILD_ARGS -DCMAKE_C_FLAGS=${TMP_C_FLAGS}
+ -DCMAKE_CXX_FLAGS=${TMP_CXX_FLAGS})
endif()
if(CMAKE_TOOLCHAIN_FILE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment