aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2020-02-17 13:41:08 +0100
committerCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2020-02-18 17:33:19 +0100
commit22e359bc19daf19033332aa2d7bb9726c7f4be14 (patch)
tree5d3697de57795276efd3529ff9bcb2c8109bbbb3 /sources/pyside2/tests
parent93daae0beea09c8d745d691889838ed816c23eba (diff)
shiboken: Improve the libdir for windows
With virtualenv 20 we have the case where the first path in the PYTHON_LIBRARIES cmake variable was wrong: a_virtual_env/libs/python3.lib so the python code inside the helper didn't have a proper check if the file was valid or it was just a wrong construct. Additionally, the 'prefix' variable will contain the virtual environment directory location, which will not contain the 'libs' directory, because that's included in the system's installation path. To solve this, we use the 'INCLUDEPY' directory, which is correct as a base to create the real 'libs' one. Task-number: PYSIDE-1231 Change-Id: Ifca08d74c49cd57572836a087edb96c089266dc7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside2/tests')
-rw-r--r--sources/pyside2/tests/pysidetest/CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/sources/pyside2/tests/pysidetest/CMakeLists.txt b/sources/pyside2/tests/pysidetest/CMakeLists.txt
index 4dcf9b89c..3ba2ad29d 100644
--- a/sources/pyside2/tests/pysidetest/CMakeLists.txt
+++ b/sources/pyside2/tests/pysidetest/CMakeLists.txt
@@ -107,10 +107,17 @@ set_property(TARGET testbinding PROPERTY OUTPUT_NAME "testbinding${SHIBOKEN_PYTH
if(WIN32)
set_property(TARGET testbinding PROPERTY SUFFIX ".pyd")
endif()
+
+if(PYTHON_LIMITED_API)
+ set(TESTBINDING_PYTHON_LIBS ${PYTHON_LIMITED_LIBRARIES})
+else()
+ set(TESTBINDING_PYTHON_LIBS ${PYTHON_LIBRARIES})
+endif()
+
target_link_libraries(testbinding
pysidetest
pyside2
- ${PYTHON_LIBRARIES}
+ ${TESTBINDING_PYTHON_LIBS}
Shiboken2::libshiboken
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}