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-28 11:16:30 +0200 |
commit | 333a68313e04f379411feecc8936e8e6f01b9c67 (patch) | |
tree | 306563e155342f969657524de09a72c580484d4e /sources/pyside6/CMakeLists.txt | |
parent | 1656bb52168c2bab0083f6b59f82b86881f72a4a (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.
Change-Id: I97d7cae07711be17c2390ac0f9db835b8d74e771
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 6dc98da382f0a6f2abf9cb48497f595073ad0f07)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'sources/pyside6/CMakeLists.txt')
-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() |