diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-09-28 16:34:28 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-10-27 16:22:34 +0200 |
commit | 6dc98da382f0a6f2abf9cb48497f595073ad0f07 (patch) | |
tree | 1b48e4909d8166743f225b106a51fa5d87108c7d /sources | |
parent | c72947a35f80d94a08d788249773f1c32ef7a7de (diff) |
CMake: Search for shiboken package in the PySide project earlier
When doing a pure CMake build of the PySide project (without
setup.py), configuration would fail with
CMake Error at CMakeLists.txt:49 (message):
Could not identify PySide6 version. Error
because the project expects the PYTHON_EXECUTABLE cache var to be set
to a valid value. This value is usually passed by the setup.py script.
Move the find_package(Shiboken) call before the version detection
code.
This allows not passing an explicit PYTHON_EXECUTABLE cache var
because the Shiboken package will set it.
Pick-to: 6.2
Change-Id: I97d7cae07711be17c2390ac0f9db835b8d74e771
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources')
-rw-r--r-- | sources/pyside6/CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/pyside6/CMakeLists.txt b/sources/pyside6/CMakeLists.txt index 3b92ff7d6..6f010d55b 100644 --- a/sources/pyside6/CMakeLists.txt +++ b/sources/pyside6/CMakeLists.txt @@ -36,6 +36,8 @@ if (QUIET_BUILD AND is_pyside6_superproject_build) endfunction() endif() +find_package(Shiboken6 2.0.0 REQUIRED) + set(PYSIDE_VERSION_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pyside_version.py") set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${PYSIDE_VERSION_FILE_PATH} @@ -63,8 +65,6 @@ else() set(PATH_SEP ":") endif() -find_package(Shiboken6 2.0.0 REQUIRED) - if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "${SHIBOKEN_BUILD_TYPE}" CACHE STRING "Build Type") endif() |