aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-05-05 14:23:44 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-05-05 16:26:19 +0200
commita7726c8ccc6e48b03cf33a864b9268e2d3de605d (patch)
treed6c86460f69db6dbee0da951dfa31f90c93ebcc8
parenta2324b279ca4db2cec14fa4148ae58d91df23cea (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. Pick-to: 6.1 6.1.0 Change-Id: I14d7f7fa306f4f3bccebd4aa2e495daaca84b481 Reviewed-by: Christian Tismer <tismer@stackless.com>
-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,