From 8ae4d5827d1ccd463b99aaf54c2e8cb482094c91 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 24 May 2017 14:15:17 +0200 Subject: 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 --- sources/shiboken2/shibokenmodule/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sources/shiboken2/shibokenmodule') diff --git a/sources/shiboken2/shibokenmodule/CMakeLists.txt b/sources/shiboken2/shibokenmodule/CMakeLists.txt index 7e90b51ab..5e8e39d5f 100644 --- a/sources/shiboken2/shibokenmodule/CMakeLists.txt +++ b/sources/shiboken2/shibokenmodule/CMakeLists.txt @@ -24,7 +24,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${libshiboken_BINARY_DIR}) add_library(shibokenmodule MODULE ${sample_SRC}) set_property(TARGET shibokenmodule PROPERTY PREFIX "") -set_property(TARGET shibokenmodule PROPERTY OUTPUT_NAME "shiboken2") +set_property(TARGET shibokenmodule PROPERTY OUTPUT_NAME "shiboken2${PYTHON_EXTENSION_SUFFIX}") + if(WIN32) if(CMAKE_BUILD_TYPE STREQUAL "Debug") set_property(TARGET shibokenmodule PROPERTY OUTPUT_NAME "shiboken2_d") @@ -37,4 +38,4 @@ target_link_libraries(shibokenmodule add_dependencies(shibokenmodule shiboken2) -install(TARGETS shibokenmodule DESTINATION ${PYTHON_SITE_PACKAGES}) \ No newline at end of file +install(TARGETS shibokenmodule DESTINATION ${PYTHON_SITE_PACKAGES}) -- cgit v1.2.3