diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/CMakeLists.txt | 4 |
2 files changed, 3 insertions, 3 deletions
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}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 570a6592..8ed6e51a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -273,7 +273,7 @@ if (BUILD_LIBRARY) add_executable(ledger main.cc global.cc) target_link_libraries(ledger libledger) - if (APPLE AND HAVE_BOOST_PYTHON) + if (CMAKE_SYSTEM_NAME STREQUAL Darwin AND HAVE_BOOST_PYTHON) target_link_libraries(ledger ${PYTHON_LIBRARIES}) endif() @@ -297,7 +297,7 @@ print(s.get_python_lib(True, prefix=''))" if (PYTHON_SITE_PACKAGES) if (WIN32 AND NOT CYGWIN) set(_ledger_python_module_name "ledger.pyd") - elseif(CMAKE_HOST_APPLE) + elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin) set(_ledger_python_module_name "ledger.so") else() set(_ledger_python_module_name "ledger${CMAKE_SHARED_LIBRARY_SUFFIX}") |