diff options
| author | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2024-07-26 10:50:53 +0200 |
|---|---|---|
| committer | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2024-07-29 12:53:12 +0200 |
| commit | 15ca8df23b015ed07b15f0191986bba88a21a74c (patch) | |
| tree | 3df70e467053532e10b9784cd86c69affe371ea1 /sources/pyside6 | |
| parent | 9f883211760881c64aab2138f49486edf6c9aae9 (diff) | |
PySide Build: Add an option to provide extra include paths for Shiboken
- Expands on 7cc5c139482d735c49002649d26bb524c92cc86b, by creating a
build option '--shiboken-extra-include-paths' that appends extra
include paths to the '--force-process-system-include-paths' option
when calling shiboken generator to create PySide6 modules.
- This can be helpful for Flatpak and OS Distro builds of PySide6.
Pick-to: 6.7
Change-Id: Ibd4c9702a741d8047ccaf53d84a1c97550d78ffe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6')
| -rw-r--r-- | sources/pyside6/cmake/PySideHelpers.cmake | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sources/pyside6/cmake/PySideHelpers.cmake b/sources/pyside6/cmake/PySideHelpers.cmake index 01c438107..48502f384 100644 --- a/sources/pyside6/cmake/PySideHelpers.cmake +++ b/sources/pyside6/cmake/PySideHelpers.cmake @@ -236,7 +236,17 @@ macro(collect_module_if_found shortname) # If the module was found, and also the module path is the same as the # Qt5Core base path, we will generate the list with the modules to be installed set(looked_in_message ". Looked in: ${${_name_dir}}") - if("${${_name_found}}" AND (("${found_basepath}" GREATER "0") OR ("${found_basepath}" EQUAL "0"))) + + # 'found_basepath' is used to ensure consistency that all the modules are from the same Qt + # directory which prevents issues from arising due to mixing versions or using incompatible Qt + # modules. When SHIBOKEN_FORCE_PROCESS_SYSTEM_INCLUDE_PATHS is not empty, we can ignore this + # requirement of 'found_basepath'. + # This is specifically useful for Flatpak build of PySide6 where For Flatpak the modules are in + # different directories. For Flatpak, although the modules are in different directories, they + # are all compatible. + if("${${_name_found}}" AND + ((("${found_basepath}" GREATER "0") OR ("${found_basepath}" EQUAL "0")) OR + (NOT SHIBOKEN_FORCE_PROCESS_SYSTEM_INCLUDE_PATHS STREQUAL ""))) message(STATUS "${module_state} module ${name} found (${ARGN})${looked_in_message}") # record the shortnames for the tests list(APPEND all_module_shortnames ${shortname}) |
