diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-05-24 14:15:17 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-07-12 12:44:41 +0000 |
commit | 8ae4d5827d1ccd463b99aaf54c2e8cb482094c91 (patch) | |
tree | 729f4acdf7f3cc6a106f119a174330387976b219 /sources/shiboken2/tests | |
parent | 64838a9a171a8665ba0ad604870f8f4046cdf142 (diff) |
Improve suffix names for shared libraries and cmake config files
This change decouples the naming of general shared libraries, python
module extensions, and cmake configuration files. All of them are now
computed depending on the python version and python build
configuration, and can also be manually set via CMake variables.
The module extensions names now use the most detailed 'import' prefix,
which usually informs whether a debug or release python was used, or
the Python ABI flags (for Python >= 3.2).
When a debug Python interpreter is used for building PySide2, the
preprocessor define Py_Debug is now correctly propagated to PySide2
sources, which fixes previous crashes in debug builds.
This affects only Linux and macOS builds. There is a subsequent change
for making it work for Windows builds.
All in all, this now allows proper mixing of debug / release versions
of the Python interpreter with debug / release versions of PySide2 on
Linux and macOS.
Task-number: PYSIDE-508
Change-Id: I88a05c3ada0fb32c7c29bdb86d7a2c15acc963b8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken2/tests')
4 files changed, 7 insertions, 0 deletions
diff --git a/sources/shiboken2/tests/minimalbinding/CMakeLists.txt b/sources/shiboken2/tests/minimalbinding/CMakeLists.txt index fb0b2cc74..7edb0290a 100644 --- a/sources/shiboken2/tests/minimalbinding/CMakeLists.txt +++ b/sources/shiboken2/tests/minimalbinding/CMakeLists.txt @@ -29,6 +29,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${libshiboken_SOURCE_DIR}) add_library(minimal MODULE ${minimal_SRC}) set_property(TARGET minimal PROPERTY PREFIX "") +set_property(TARGET minimal PROPERTY OUTPUT_NAME "minimal${PYTHON_EXTENSION_SUFFIX}") if(WIN32) set_property(TARGET minimal PROPERTY SUFFIX ".pyd") endif() diff --git a/sources/shiboken2/tests/otherbinding/CMakeLists.txt b/sources/shiboken2/tests/otherbinding/CMakeLists.txt index ac7178e5d..7d4dd5b55 100644 --- a/sources/shiboken2/tests/otherbinding/CMakeLists.txt +++ b/sources/shiboken2/tests/otherbinding/CMakeLists.txt @@ -35,6 +35,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${libshiboken_SOURCE_DIR}) add_library(other MODULE ${other_SRC}) set_property(TARGET other PROPERTY PREFIX "") +set_property(TARGET other PROPERTY OUTPUT_NAME "other${PYTHON_EXTENSION_SUFFIX}") + if(WIN32) set_property(TARGET other PROPERTY SUFFIX ".pyd") endif() diff --git a/sources/shiboken2/tests/samplebinding/CMakeLists.txt b/sources/shiboken2/tests/samplebinding/CMakeLists.txt index f897712f4..1b97bd0e8 100644 --- a/sources/shiboken2/tests/samplebinding/CMakeLists.txt +++ b/sources/shiboken2/tests/samplebinding/CMakeLists.txt @@ -136,6 +136,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${libshiboken_SOURCE_DIR}) add_library(sample MODULE ${sample_SRC}) set_property(TARGET sample PROPERTY PREFIX "") +set_property(TARGET sample PROPERTY OUTPUT_NAME "sample${PYTHON_EXTENSION_SUFFIX}") + if(WIN32) set_property(TARGET sample PROPERTY SUFFIX ".pyd") endif() diff --git a/sources/shiboken2/tests/smartbinding/CMakeLists.txt b/sources/shiboken2/tests/smartbinding/CMakeLists.txt index e9c52d447..aab2121d3 100644 --- a/sources/shiboken2/tests/smartbinding/CMakeLists.txt +++ b/sources/shiboken2/tests/smartbinding/CMakeLists.txt @@ -30,6 +30,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${libshiboken_SOURCE_DIR}) add_library(smart MODULE ${smart_SRC}) set_property(TARGET smart PROPERTY PREFIX "") +set_property(TARGET smart PROPERTY OUTPUT_NAME "smart${PYTHON_EXTENSION_SUFFIX}") + if(WIN32) set_property(TARGET smart PROPERTY SUFFIX ".pyd") endif() |