aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/cmake/PySideSetup.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2023-10-11 18:02:38 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2023-11-01 16:52:29 +0100
commit3d8e5382fb8d1239f7390c06dcad3ca8a96e299e (patch)
treeba3c3b6902d4089b678afabd617e0db6186ae264 /sources/pyside6/cmake/PySideSetup.cmake
parent22128c3d683bd556fb4efb070dc3fef5878ef9e0 (diff)
CMake: Allow passing extra generator flags via a CMake variable
When building shiboken or pyside directly using CMake, allow passing extra command line options to the shiboken executable when generating bindings. The variable is called SHIBOKEN_GENERATOR_EXTRA_FLAGS and expects a semicolon list of extra options to pass. This is useful for cross-compilation to specify things like extra compiler flags or include paths that the API extractor should take into account when parsing sources. Pick-to: 6.6 Task-number: PYSIDE-1958 Change-Id: I4896fc870d85861e7cc5adbb0e5ae7222ab61a40 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/cmake/PySideSetup.cmake')
-rw-r--r--sources/pyside6/cmake/PySideSetup.cmake12
1 files changed, 7 insertions, 5 deletions
diff --git a/sources/pyside6/cmake/PySideSetup.cmake b/sources/pyside6/cmake/PySideSetup.cmake
index d6f20bd11..577a3fc7a 100644
--- a/sources/pyside6/cmake/PySideSetup.cmake
+++ b/sources/pyside6/cmake/PySideSetup.cmake
@@ -218,11 +218,13 @@ if(NOT PYTHON_SITE_PACKAGES)
shiboken_internal_set_python_site_packages()
endif()
-set(GENERATOR_EXTRA_FLAGS --generator-set=shiboken
- --enable-parent-ctor-heuristic
- --enable-pyside-extensions
- --enable-return-value-heuristic
- --use-isnull-as-nb-bool)
+set(GENERATOR_EXTRA_FLAGS
+ ${SHIBOKEN_GENERATOR_EXTRA_FLAGS}
+ --generator-set=shiboken
+ --enable-parent-ctor-heuristic
+ --enable-pyside-extensions
+ --enable-return-value-heuristic
+ --use-isnull-as-nb-bool)
use_protected_as_public_hack()
# Build with Address sanitizer enabled if requested. This may break things, so use at your own risk.