aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-05-05 14:23:44 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-05-05 16:46:47 +0000
commitcbbfc196ca8905804ad4c8cbfd0c83c2c80d8d8c (patch)
tree66110da53499fcfe26ad8b248a9c10b8ea4205cc /sources
parenta465d8effe32a47669e330f7e1f33eefc1e57e97 (diff)
Revert "Ensure Python libs needed by shiboken are not empty"
This reverts commit e664f7e525129c2ac356edecb2dd1255d93ad00a. It breaks the limited API build by linking to versioned python library. Change-Id: I14d7f7fa306f4f3bccebd4aa2e495daaca84b481 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit a7726c8ccc6e48b03cf33a864b9268e2d3de605d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'sources')
-rw-r--r--sources/shiboken6/data/shiboken_helpers.cmake35
1 files changed, 21 insertions, 14 deletions
diff --git a/sources/shiboken6/data/shiboken_helpers.cmake b/sources/shiboken6/data/shiboken_helpers.cmake
index b0b06856a..7b81abb65 100644
--- a/sources/shiboken6/data/shiboken_helpers.cmake
+++ b/sources/shiboken6/data/shiboken_helpers.cmake
@@ -309,22 +309,29 @@ macro(shiboken_compute_python_libraries)
"SHIBOKEN_COMPUTE_LIBS" "shiboken_compute_python_libraries"
"IS_CALLED_FROM_EXPORT" "" "" ${ARGN})
+ if (NOT SHIBOKEN_PYTHON_LIBRARIES)
+ set(SHIBOKEN_PYTHON_LIBRARIES "")
+ endif()
+
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ if(WIN32 AND NOT SHIBOKEN_PYTHON_LIBRARIES)
+ set(SHIBOKEN_PYTHON_LIBRARIES ${PYTHON_DEBUG_LIBRARIES})
+ endif()
+ endif()
+
+ if(CMAKE_BUILD_TYPE STREQUAL "Release")
+ if(WIN32 AND NOT SHIBOKEN_PYTHON_LIBRARIES)
+ set(SHIBOKEN_PYTHON_LIBRARIES ${PYTHON_LIBRARIES})
+ endif()
+ endif()
+
+ # If the resulting variable
+ # contains a "debug;X;optimized;Y" list like described in shiboken_check_if_limited_api,
+ # make sure to pick just one, so that the final generator expressions are valid.
+ shiboken_get_library_for_current_config("${SHIBOKEN_PYTHON_LIBRARIES}" "${CMAKE_BUILD_TYPE}" "SHIBOKEN_PYTHON_LIBRARIES")
+
if(APPLE)
set(SHIBOKEN_PYTHON_LIBRARIES "-undefined dynamic_lookup")
- else()
- if(NOT SHIBOKEN_PYTHON_LIBRARIES)
- if(CMAKE_BUILD_TYPE STREQUAL "Debug")
- set(SHIBOKEN_PYTHON_LIBRARIES ${PYTHON_DEBUG_LIBRARIES})
- else()
- set(SHIBOKEN_PYTHON_LIBRARIES ${PYTHON_LIBRARIES})
- endif()
- endif()
- # If the resulting variable contains a "debug;X;optimized;Y" list like
- # described in shiboken_check_if_limited_api, make sure to pick just
- # one, so that the final generator expressions are valid.
- shiboken_get_library_for_current_config("${SHIBOKEN_PYTHON_LIBRARIES}"
- "${CMAKE_BUILD_TYPE}"
- "SHIBOKEN_PYTHON_LIBRARIES")
endif()
# If the installed shiboken config file is used,