From e959d2899f38f5b0828035fe7d4769b3603e2974 Mon Sep 17 00:00:00 2001 From: renatofilho Date: Tue, 21 Sep 2010 15:44:39 -0300 Subject: The CMake configuration for PySide and Shiboken use the PYTHON_LIBRARIES variable to link against Python. This is not the correct way to link against Python on OS X. Instead of specifying a library or the framework, one simply uses the flag "-undefined dynamic_lookup". The symbols will be resolved at runtime when the extension module loads. Fixes bug #352: Thanks to Robert Kern Reviewer: Hugo Parente Lima Luciano Wolf --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c831763a..dab1888bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ if(MSVC) set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /GR /EHsc /DWIN32 /D_WINDOWS /D_SCL_SECURE_NO_WARNINGS") else() if(CMAKE_HOST_UNIX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden -Wno-strict-aliasing") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden -Wno-strict-aliasing") endif() set(CMAKE_CXX_FLAGS_DEBUG "-g") option(ENABLE_GCC_OPTIMIZATION "Enable specific GCC flags to optimization library size and performance. Only available on Release Mode" 0) @@ -83,6 +83,9 @@ else() set(SBK_PYTHON_LIBRARIES ${PYTHON_LIBRARIES}) add_definitions("-DNDEBUG") endif() +if(APPLE) + set(SBK_PYTHON_LIBRARIES "-undefined dynamic_lookup") +endif() if (BUILD_TESTS) -- cgit v1.2.3