aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/cmake/Macros/PySideModules.cmake
diff options
context:
space:
mode:
authorShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2025-05-19 12:49:01 +0200
committerShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2025-07-04 11:23:32 +0200
commit9a87f647acebacc330c7f426465cf0b45e3d1375 (patch)
treee9730a61181f7acee270d575b49fdb2699236efe /sources/pyside6/cmake/Macros/PySideModules.cmake
parent662917b9439bea5a2784a19aa827f7d85a5e3cc5 (diff)
Shiboken: Cleanup CMake configuration files
- Removed unused variables in the Config file. SHIBOKEN_SHARED_LIBRARY_DIR and SHIBOKEN_INCLUDE_DIR can be obtained from the `libshiboken` cmake target as a property, and SHIBOKEN_PYTHON_MODULE_DIR can be obtained from PYTHON_SITE_PACKAGES Change-Id: I7a27f70055835c64029cee0bef33158e48f2d7a4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside6/cmake/Macros/PySideModules.cmake')
-rw-r--r--sources/pyside6/cmake/Macros/PySideModules.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/sources/pyside6/cmake/Macros/PySideModules.cmake b/sources/pyside6/cmake/Macros/PySideModules.cmake
index 0b9b721a6..d98c1d83f 100644
--- a/sources/pyside6/cmake/Macros/PySideModules.cmake
+++ b/sources/pyside6/cmake/Macros/PySideModules.cmake
@@ -285,6 +285,14 @@ macro(create_pyside_module)
set(ld_prefix_var_name "LD_LIBRARY_PATH")
endif()
+ # Get the full path to the directory containing the shiboken shared library
+ get_target_property(_shiboken_lib_location Shiboken6::libshiboken IMPORTED_LOCATION_RELEASE)
+ if(NOT _shiboken_lib_location)
+ get_target_property(_shiboken_lib_location Shiboken6::libshiboken IMPORTED_LOCATION)
+ endif()
+ # Get the directory containing the library file, which is the lib directory
+ get_filename_component(SHIBOKEN_SHARED_LIBRARY_DIR "${_shiboken_lib_location}" DIRECTORY)
+
set(ld_prefix_list "")
list(APPEND ld_prefix_list "${pysidebindings_BINARY_DIR}/libpyside")
list(APPEND ld_prefix_list "${pysidebindings_BINARY_DIR}/libpysideqml")
@@ -328,6 +336,7 @@ macro(create_pyside_module)
# on the host machine (usually, unless you use some userspace qemu based mechanism).
# TODO: Can we do something better here to still get pyi files?
if(NOT (PYSIDE_IS_CROSS_BUILD OR DISABLE_PYI))
+ set(SHIBOKEN_PYTHON_MODULE_DIR "${PYTHON_SITE_PACKAGES}/shiboken6")
set(generate_pyi_options ${module_NAME} --sys-path
"${pysidebindings_BINARY_DIR}"
"${SHIBOKEN_PYTHON_MODULE_DIR}/..") # use the layer above shiboken6