summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-09-21 15:44:39 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-09-21 15:53:00 -0300
commitc8cc5c1c819f23a3f98fbcc05cff3a15714f31d0 (patch)
tree77b3922193c7c2d716393404d9b5f9ecba6a7bb7 /CMakeLists.txt
parentabdb20e1a2f1032b2e467ab13b004ff5c9fbd1a0 (diff)
downloadshiboken-c8cc5c1c819f23a3f98fbcc05cff3a15714f31d0.tar.gz
shiboken-c8cc5c1c819f23a3f98fbcc05cff3a15714f31d0.tar.xz
shiboken-c8cc5c1c819f23a3f98fbcc05cff3a15714f31d0.zip
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 <robert.kern@gmail.com> Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8c831763..dab1888b 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)