aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/main.py
diff options
context:
space:
mode:
authorShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2024-07-09 15:06:40 +0200
committerShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2024-07-13 20:34:16 +0200
commit63ad6e7f69acc44e0e4b7ed1509394e928567c51 (patch)
tree65827be5880e51e5e2e4a3201b5983915c6553ed /build_scripts/main.py
parenta7a467a2a9d2ee97e78ec830115b9a7d504c01c7 (diff)
PySide Build: Add option to force process system headers
- Expands on 7cc5c139482d735c49002649d26bb524c92cc86b, by creating a build option '-shiboken-foce-process-system-headers' that enables the '--force-process-system-include-paths' option when calling shiboken generator to create PySide6 modules. - This is specifically needed for Flatpak build of PySide6, where the Qt is installed globally and Qt headers are located in system header path. The alternative option would be to use CMake instructions directly, but this can make the Flatpak recipe for PySide6 quite cumbersome because on top of the huge CMake command, we need to manually move all the relevant PySide6 packages to the 'site-packages' of the concerned Python environment. The 'setup.py' build instruction automatically does this for us. - This can also help OS Distro maintainers to use 'setup.py' instead of CMake instructions to build PySide6 packages, if no other compiler flags or other optimizations are needed. Pick-to: 6.7 Task-number: PYSIDE-2702 Change-Id: I183f480c1fbb2b16badca4a81bf2cd008a6de0b3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'build_scripts/main.py')
-rw-r--r--build_scripts/main.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index a7e31e02e..3ad1cb2c5 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -592,6 +592,10 @@ class PysideBuild(_build, CommandMixin, BuildInfoCollectorMixin):
cmake_cmd.append(f"-DCMAKE_UNITY_BUILD_BATCH_SIZE={batch_size}")
log.info("Using UNITY build")
+ if OPTION['SHIBOKEN_FORCE_PROCESS_SYSTEM_HEADERS']:
+ cmake_cmd.append("-DPYSIDE_TREAT_QT_INCLUDE_DIRS_AS_NON_SYSTEM=ON")
+ log.info("Shiboken will now process system Qt headers")
+
cmake_cmd += [
"-G", self.make_generator,
f"-DBUILD_TESTS={self.build_tests}",