diff --git a/generator/mwm_diff/pymwm_diff/CMakeLists.txt b/generator/mwm_diff/pymwm_diff/CMakeLists.txt index 419d90eedf..e2ac838360 100644 --- a/generator/mwm_diff/pymwm_diff/CMakeLists.txt +++ b/generator/mwm_diff/pymwm_diff/CMakeLists.txt @@ -22,4 +22,8 @@ omim_link_libraries( ${LIBZ} ) +if (PLATFORM_MAC) + omim_link_libraries(${PROJECT_NAME} "-Wl,-undefined,dynamic_lookup") +endif() + set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") diff --git a/generator/pygen/CMakeLists.txt b/generator/pygen/CMakeLists.txt index 5d94ce4c56..88a4a2a5a7 100644 --- a/generator/pygen/CMakeLists.txt +++ b/generator/pygen/CMakeLists.txt @@ -50,4 +50,8 @@ omim_link_libraries( link_qt5_core(${PROJECT_NAME}) link_qt5_network(${PROJECT_NAME}) +if (PLATFORM_MAC) + omim_link_libraries(${PROJECT_NAME} "-Wl,-undefined,dynamic_lookup") +endif() + set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") diff --git a/kml/pykmlib/CMakeLists.txt b/kml/pykmlib/CMakeLists.txt index 47da2a952d..dfdb3b04d9 100644 --- a/kml/pykmlib/CMakeLists.txt +++ b/kml/pykmlib/CMakeLists.txt @@ -32,7 +32,7 @@ omim_link_libraries( link_qt5_core(${PROJECT_NAME}) if (PLATFORM_MAC) - omim_link_libraries(${PROJECT_NAME} ${LIBZ}) + omim_link_libraries(${PROJECT_NAME} "-Wl,-undefined,dynamic_lookup") endif() set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") diff --git a/local_ads/pylocal_ads/CMakeLists.txt b/local_ads/pylocal_ads/CMakeLists.txt index 46478a4c40..20fdad6a6b 100644 --- a/local_ads/pylocal_ads/CMakeLists.txt +++ b/local_ads/pylocal_ads/CMakeLists.txt @@ -16,4 +16,8 @@ omim_link_libraries( base ) +if (PLATFORM_MAC) + omim_link_libraries(${PROJECT_NAME} "-Wl,-undefined,dynamic_lookup") +endif() + set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") diff --git a/search/pysearch/CMakeLists.txt b/search/pysearch/CMakeLists.txt index 82ce67fa77..2a5916433e 100644 --- a/search/pysearch/CMakeLists.txt +++ b/search/pysearch/CMakeLists.txt @@ -39,4 +39,8 @@ omim_link_libraries( link_qt5_core(${PROJECT_NAME}) link_qt5_network(${PROJECT_NAME}) +if (PLATFORM_MAC) + omim_link_libraries(${PROJECT_NAME} "-Wl,-undefined,dynamic_lookup") +endif() + set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") diff --git a/tracking/pytracking/CMakeLists.txt b/tracking/pytracking/CMakeLists.txt index 7a2e4adf14..1317dc66ae 100644 --- a/tracking/pytracking/CMakeLists.txt +++ b/tracking/pytracking/CMakeLists.txt @@ -9,5 +9,17 @@ include_directories(${CMAKE_BINARY_DIR}) omim_add_library(${PROJECT_NAME} MODULE ${SRC}) -omim_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} tracking coding geometry base) +omim_link_libraries( + ${PROJECT_NAME} + ${Boost_LIBRARIES} + tracking + coding + geometry + base +) + +if (PLATFORM_MAC) + omim_link_libraries(${PROJECT_NAME} "-Wl,-undefined,dynamic_lookup") +endif() + set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") diff --git a/traffic/pytraffic/CMakeLists.txt b/traffic/pytraffic/CMakeLists.txt index 362b7d3c53..3aee6bd7fa 100644 --- a/traffic/pytraffic/CMakeLists.txt +++ b/traffic/pytraffic/CMakeLists.txt @@ -14,6 +14,7 @@ if (PLATFORM_MAC) ${PROJECT_NAME} ${Qt5Widgets_LIBRARIES} "-framework QuartzCore" + "-Wl,-undefined,dynamic_lookup" ) endif()