diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-01-19 08:22:59 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-01-19 08:23:01 +0100 |
commit | d3b003f4f63a82f4cca6f4f14cd3ebb2095b1ce8 (patch) | |
tree | 9f4d935005a07e314cfabbce3ddf4e3b283007f2 /sources/shiboken2/CMakeLists.txt | |
parent | 84db89c50e217db8811f20a58f959e82824d8338 (diff) | |
parent | c50004a5fec7bebaa957596a91a43959c85da8a5 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.9
Change-Id: I5f2e1660a27efafa445592898db4dfe3250306e0
Diffstat (limited to 'sources/shiboken2/CMakeLists.txt')
-rw-r--r-- | sources/shiboken2/CMakeLists.txt | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sources/shiboken2/CMakeLists.txt b/sources/shiboken2/CMakeLists.txt index 288de8117..b9dd0a7f9 100644 --- a/sources/shiboken2/CMakeLists.txt +++ b/sources/shiboken2/CMakeLists.txt @@ -302,6 +302,12 @@ execute_process( OUTPUT_STRIP_TRAILING_WHITESPACE) set(SHIBOKEN_BUILD_TYPE "Release") + +# We do not want to link against the python shared / static library on Linux And macOS. +# The dynamic linker will pick up the python symbols at runtime automatically. +# On Windows we do need to link against the python.lib import library. + +set(SBK_PYTHON_LIBRARIES "") if(CMAKE_BUILD_TYPE STREQUAL "Debug") if(NOT PYTHON_DEBUG_LIBRARIES) message(WARNING "Python debug shared library not found; assuming python was built with shared library support disabled.") @@ -321,10 +327,14 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug") set(SBK_PKG_CONFIG_PY_DEBUG_DEFINITION "${SBK_PKG_CONFIG_PY_DEBUG_DEFINITION} -DCOUNT_ALLOCS") endif() - set(SBK_PYTHON_LIBRARIES ${PYTHON_DEBUG_LIBRARIES}) + if(WIN32) + set(SBK_PYTHON_LIBRARIES ${PYTHON_DEBUG_LIBRARIES}) + endif() set(SHIBOKEN_BUILD_TYPE "Debug") else() - set(SBK_PYTHON_LIBRARIES ${PYTHON_LIBRARIES}) + if(WIN32) + set(SBK_PYTHON_LIBRARIES ${PYTHON_LIBRARIES}) + endif() add_definitions("-DNDEBUG") endif() |