aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-01-19 08:22:59 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-01-19 08:23:01 +0100
commitd3b003f4f63a82f4cca6f4f14cd3ebb2095b1ce8 (patch)
tree9f4d935005a07e314cfabbce3ddf4e3b283007f2 /sources
parent84db89c50e217db8811f20a58f959e82824d8338 (diff)
parentc50004a5fec7bebaa957596a91a43959c85da8a5 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.9
Diffstat (limited to 'sources')
-rw-r--r--sources/pyside2/tests/QtCore/qinstallmsghandler_test.py7
-rw-r--r--sources/shiboken2/CMakeLists.txt14
2 files changed, 16 insertions, 5 deletions
diff --git a/sources/pyside2/tests/QtCore/qinstallmsghandler_test.py b/sources/pyside2/tests/QtCore/qinstallmsghandler_test.py
index d8f7bb3a5..08580823e 100644
--- a/sources/pyside2/tests/QtCore/qinstallmsghandler_test.py
+++ b/sources/pyside2/tests/QtCore/qinstallmsghandler_test.py
@@ -65,9 +65,10 @@ class QInstallMsgHandlerTest(unittest.TestCase):
def testHandler(self):
rethandler = qInstallMessageHandler(handler)
- qDebug("Test Debug")
- self.assertEqual(param[0], QtDebugMsg)
- self.assertEqual(param[2], "Test Debug")
+ if QLibraryInfo.isDebugBuild():
+ qDebug("Test Debug")
+ self.assertEqual(param[0], QtDebugMsg)
+ self.assertEqual(param[2], "Test Debug")
qWarning("Test Warning")
self.assertEqual(param[0], QtWarningMsg)
self.assertEqual(param[2], "Test Warning")
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()