diff options
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a368d378..65e58edb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -152,7 +152,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug") -Wno-unused-parameter -Wno-c++98-compat -fno-limit-debug-info) - + macro(ADD_PCH_RULE _header_filename _src_list _other_srcs) set(_pch_filename "${_header_filename}.pch") @@ -188,7 +188,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug") COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} ${_args} DEPENDS ${_header_filename}) endmacro(ADD_PCH_RULE _header_filename _src_list _other_srcs) - + elseif(CMAKE_CXX_COMPILER MATCHES "g\\+\\+") set(GXX_WARNING_FLAGS -pedantic @@ -210,7 +210,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug") -Wno-strict-aliasing) add_definitions(${GXX_WARNING_FLAGS}) - + macro(ADD_PCH_RULE _header_filename _src_list _other_srcs) set(_gch_filename "${_header_filename}.gch") @@ -247,7 +247,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug") COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} ${_args} DEPENDS ${_header_filename}) endmacro(ADD_PCH_RULE _header_filename _src_list _other_srcs) - + else() macro(ADD_PCH_RULE _header_filename _src_list _other_srcs) endmacro(ADD_PCH_RULE _header_filename _src_list _other_srcs) @@ -273,6 +273,9 @@ if (BUILD_LIBRARY) add_executable(ledger main.cc global.cc) target_link_libraries(ledger libledger) + if (CMAKE_SYSTEM_NAME STREQUAL Darwin AND HAVE_BOOST_PYTHON) + target_link_libraries(ledger ${PYTHON_LIBRARIES}) + endif() install(TARGETS libledger DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(FILES ${LEDGER_INCLUDES} @@ -294,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}") |