From d0fba947ade223dfa351c49ac15c6939c35b5f89 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Tue, 28 Jul 2015 20:55:56 +0200 Subject: [cmake] Use CMAKE_SYSTEM_NAME to test the platform. APPLE and CMAKE_HOST_APPLE only check the host system, whereas CMAKE_SYSTEM_NAME checks the target system when cross-compiling. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 6166780c..3c8c36ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -225,7 +225,7 @@ macro(add_ledger_library_dependencies _target) target_link_libraries(${_target} ${INTL_LIB}) endif() if (HAVE_BOOST_PYTHON) - if(APPLE) + if(CMAKE_SYSTEM_NAME STREQUAL Darwin) # Don't link directly to a Python framework on OS X, to avoid segfaults # when the module is imported from a different interpreter target_link_libraries(${_target} ${Boost_LIBRARIES}) -- cgit v1.2.3