diff options
author | renatofilho <renato.filho@openbossa.org> | 2010-09-21 15:44:39 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:07:18 -0300 |
commit | e959d2899f38f5b0828035fe7d4769b3603e2974 (patch) | |
tree | 4395e0a8b5c5534d6ecd61ebfa092fe414c341e6 /CMakeLists.txt | |
parent | 24d496c1d05baae8f129d76207709276391faebf (diff) |
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.txt | 5 |
1 files changed, 4 insertions, 1 deletions
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) |