diff options
author | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2023-08-04 14:20:15 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-09-06 11:23:03 +0000 |
commit | 10b3dd1e586af0ac5293f2444979e439b4dfc72b (patch) | |
tree | f1a25b0c8f9481e27ac174546bfdab44d530cac5 | |
parent | cb0a195932585fcf747fe91d5dea15054df3be38 (diff) |
Shiboken Module: Fix installation
- Amends 1e501c49bfa0832fd4a36903bc88a20f88565cf7
- The solution with ".." creates an issue with installation of
shibokemodule that none of the cmake installation properties were
able to take effect. Also the strip() was never applied to
shibokenmodule because of this.
The install() in cmake simply copies the binary to the install
location. When it tries to apply the properties eg: INSTALL_RPATH to
shibokenmodule located in the installation path it fails because
of the existing ".." and hence make/ninja to be not able to find
shibokemodule.
See the first comment for how the build file section for this looked
like earlier.
- The correct solution is to set the LIBRARY_RUNTIME_DIRECTORY instead
of the ".." hack.
Task-number: PYSIDE-1497
Task-number: PYSIDE-2410
Change-Id: I375fd70147910e097fa65d619f365c0c4de2af5a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 6491c23a2bfc8bfb470e02dfbb28dce7a552c1b7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | sources/shiboken6/shibokenmodule/CMakeLists.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sources/shiboken6/shibokenmodule/CMakeLists.txt b/sources/shiboken6/shibokenmodule/CMakeLists.txt index c0cf72b72..702750450 100644 --- a/sources/shiboken6/shibokenmodule/CMakeLists.txt +++ b/sources/shiboken6/shibokenmodule/CMakeLists.txt @@ -28,9 +28,12 @@ add_custom_command( add_library(shibokenmodule MODULE ${sample_SRC}) target_include_directories(shibokenmodule PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}) -set_property(TARGET shibokenmodule PROPERTY PREFIX "") -# PYSIDE-1497: This `..` is the crucial trick to unify the path location of `Shiboken`. -set_property(TARGET shibokenmodule PROPERTY OUTPUT_NAME "../Shiboken${PYTHON_EXTENSION_SUFFIX}") + +set_target_properties(shibokenmodule PROPERTIES + PREFIX "" + OUTPUT_NAME "Shiboken${PYTHON_EXTENSION_SUFFIX}" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/..") if(WIN32) set_property(TARGET shibokenmodule PROPERTY SUFFIX ".pyd") |