aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/cmake
Commit message (Collapse)AuthorAgeFilesLines
* PySide6-Android: Add QtWebViewShyamnath Premnadh11 days1-2/+6
| | | | | | | | | - QtWebView was previously missing from the Android build configuration. Pick-to: 6.8 6.10 Fixes: PYSIDE-3248 Change-Id: I11230b9bff6a45bee3af0dba498e7d76ca678e61 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Shiboken6Tools: Use shiboken6-generator from CMake easilyShyamnath Premnadh2025-08-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Inspecting the `samplebinding` example, much of the code to effectively call `shiboken6-generator` can be moved into CMake function `shiboken_generator_create_binding` and shipped with `Shiboken6Tools` cmake package enabling users to easily use `shiboken6-generator` in their CMake projects. This also helps to get rid of the `pyside_config.py` script which is used to query certain required paths. - This `Shiboken6Tools` CMake package is packaged with the `shiboken6-generator` wheel and can be used easily in CMake projects by using the `find_package(Shiboken6Tools)` command by adding the Python site-packages directory to the CMake module path. - The `shiboken6-generator` path installed into the Python site-packages is different from the one used by the consecutive setup.py build/ super project build. Hence, we create a new export set `Shiboken6ToolsWheelTargets` just for the wheel package. When copied into `package_for_wheels` this export set is used. - Add a special condition to the `Shiboken6ToolsConfig.cmake` file to skip the dependency checking when building PySide which would otherwise lead to a circular dependency. Task-number: PYSIDE-3138 Change-Id: I199b8d9fe743adee4e3b12e8a7e1ad01f3c277de Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* PySide6: Cleanup CMake configuration filesShyamnath Premnadh2025-07-071-0/+1
| | | | | | | | | | | | | | - Variables PYSIDE_PYTHONPATH, PYSIDE_TYPESYSTEMS, PYSIDE_GLUE were corrected to correctly reflect the paths for the build-tree in the CMake configuration files during super-project build of PySide6. These were also corrected for the install-tree based on the wheel structure. - Introduce two new CMake variables PYSIDE_PYTHON_CONFIG_SUFFIX and PYSIDE_SO_VERSION shipped with the CMake config files. - Fix pyside6qml to use the export set of pyside6. Change-Id: I3b177bfed31af1d0e3a13fcc9469019a7f349d22 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Install QtAsyncioFriedemann Kleint2025-07-071-2/+15
| | | | | | | Initial-patch-by: Christian Tismer <tismer@stackless.com> Task-number: PYSIDE-769 Change-Id: I3e7bf645a2b55249685f7aac58eb93342bdb6eb7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide: Fix debug buildShyamnath Premnadh2025-07-071-4/+15
| | | | | | | | | - Amends 9a87f647acebacc330c7f426465cf0b45e3d1375 to include debug build scenario. Change-Id: If5b00e93cfd7446a7f7e411bf4901db1009c02f2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Shiboken: Cleanup CMake configuration filesShyamnath Premnadh2025-07-041-0/+9
| | | | | | | | | | | - 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>
* Modify headers installation for CMake buildsShyamnath Premnadh2025-07-041-1/+1
| | | | | | | | | | | | | | | | | | | Previously, the headers are installed as ${CMAKE_INSTALL_PREFIX}/include/cmake_package_name, where cmake_package_name is the CMake package name, e.g., PySide6. In the wheels, the headers were included as package_name/include. Since the level of the include directory is different, this caused issues when importing the CMake package in a downstream project. - This change modifies the installation of the headers so that the CMake install prefix and the wheels are consistent. - Additionally - this change adds the libpyside6 headers to the wheels. - The include headers for libshiboken were shipped with shiboken6-generator and not with shiboken6, which has the libshiboken binary. Change-Id: I96e3280799da169836e24551b906274f5b0fc962 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* build system: Extend sanitizer supportFriedemann Kleint2025-07-021-1/+4
| | | | | | | | | Enable address sanitizer for MSVC, which has gained support in the mean time. Add thread sanitizer with a warning. Task-number: PYSIDE-2221 Change-Id: Iaa5a377fdb1cf33c1dcad42df5528a3a3499c773 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* build system: Switch to new cross compilation support of shiboken6Friedemann Kleint2025-06-272-20/+10
| | | | | | | Fixes: PYSIDE-3105 Change-Id: Ie91ee71e7cd9948e34f3425cf42ff18326d9abe9 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Ece Cinucen <ece.cinucen@qt.io>
* Fix PySide build for 6.10Friedemann Kleint2025-06-252-4/+6
| | | | | | | | Task-number: PYSIDE-3011 Task-number: QTBUG-87776 Change-Id: If1bbeb6599ef60d72f49a949a30b01f9140c8d97 Reviewed-by: Ece Cinucen <ece.cinucen@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Remove hard-coded Q_OS_ defines from the CMake filesFriedemann Kleint2025-06-182-23/+0
| | | | | | | | | | | | | The hard-coded ENABLE_ and Q_OS_ do not work for cross-compiling. They are in fact a left-over from the pre-clang code parser. Clang is actually able to set the right defines when parsing qsystemdetection.h if the correct target is set. pyside6_global.h then no longer needs to be configured by CMake. Task-number: PYSIDE-3105 Change-Id: I640ab9e254b9ba35d5b7194001f5700911a8d421 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Pass CMAKE_SYSTEM_NAME as platform argument to shiboken6Friedemann Kleint2025-06-131-0/+1
| | | | | | Task-number: PYSIDE-3105 Change-Id: I2d1adb0b7b819caab09e72e382a9dc0f964fa14d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Make Remote Objects usable beyond ModelsBrett Stottlemyer2025-03-132-0/+4
| | | | | | | | | | | | While present, the Qt Remote Objects bindings to Python have not been very useful. The only usable components were those based on QAbstractItemModel, due to the lack of a way to interpret .rep files from Python. This addresses that limitation. Fixes: PYSIDE-862 Change-Id: Ice57c0c64f11c3c7e74d50ce3c48617bd9b422a3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Brett Stottlemyer <brett.stottlemyer@gmail.com>
* Switch `find_package` from `Qt6<module>` to `Qt6::<component>`Cristian Le2025-03-052-8/+13
| | | | | | | | This guarantees that all find_package hints for `Qt6` are accounted for. Fixes: PYSIDE-3026 Change-Id: Iab7d3a72b1743747e360e7f5ed2372e1b30fa047 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PySide: Add WebView for macOSShyamnath Premnadh2024-12-171-1/+1
| | | | | | | | | - caused by wrong condition check in 83603fed574fc7b0eed452b347170862b12a98f6 Pick-to: 6.8 Fixes: PYSIDE-2964 Change-Id: I1b5c441cd7448898e44f8d829b91202e68168666 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix trailing empty linesFriedemann Kleint2024-12-132-2/+0
| | | | | | Pick-to: 6.8 Change-Id: I1a5964463f703ade0657816cb974206355a5ae5b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix building of QtWebViewFriedemann Kleint2024-11-081-2/+2
| | | | | | | | | | | Add missing find_package() statement and simplify condition. Amends 83603fed574fc7b0eed452b347170862b12a98f6. Task-number: PYSIDE-2910 Pick-to: 6.8 6.5 Change-Id: I9d899f141495c486002f01bf7e5db036244d009a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* build: Install module doc snippet filesFriedemann Kleint2024-10-161-0/+9
| | | | | | | | | | Amends b55e221464c18053fa44f18132071ebdaee8f432. Task-number: PYSIDE-1106 Fixes: PYSIDE-2893 Pick-to: 6.8 Change-Id: I4a2688bfb5fcdddc5c6baea49d2fdc9c0f2381f1 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Adapt to 6.8Friedemann Kleint2024-09-051-0/+1
| | | | | | | Task-number: PYSIDE-2620 Task-number: QTBUG-125719 Change-Id: I6efeb1770c9bd7cddc3dbd91ca6294b9fddc9cc9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* WebView: Make QtWebView depend on WebEngine foundShyamnath Premnadh2024-08-131-1/+6
| | | | | | | | | | - Make QtWebView depend on WebEngineCore and WebEngineQuick when building for Windows or Linux. - Additionally, fix the dependency to not target APPLE. Pick-to: 6.5 6.7 Change-Id: Idfa17ef2ab290cc7ca08364a3e4a98d171f10324 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6/__init__.py replace runtime list of modules for static oneCristián Maureira-Fredes2024-08-071-0/+6
| | | | | | | | | | This aims to fix the issues that static analysis tools might have when exploring the PySide available modules. Fixes: PYSIDE-2836 Pick-to: 6.7 6.5 6.2 Change-Id: If37795acb68feb71df4934a15e3f0543a085ab33 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken: Support compiler options for disabling optimizationsChristian Tismer2024-08-011-0/+4
| | | | | | | | | | | | | | | | | | | The fullname field has been removed, and the signature structures can be optionally compressed. Add a build option for switching these and future compiler features off. Combinable flags: --unoptimize=fullname --unoptimize=compression --unoptimize=folding (to be implemented) or just --unoptimize=all Task-number: PYSIDE-2701 Change-Id: I605dc810542ce99f99d9a6b6432e5feae09273b4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QtWebViewShyamnath Premnadh2024-07-311-1/+1
| | | | | | | | | [ChangeLog][PySide6] QtWebView has been added. Pick-to: 6.5 6.7 Task-number: PYSIDE-2825 Change-Id: I4617cb6b170b37c232ba55aa8be374f150604105 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide Build: Add an option to provide extra include paths for ShibokenShyamnath Premnadh2024-07-291-1/+11
| | | | | | | | | | | | - 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>
* PySide: remove duplicates from the header include pathsShyamnath Premnadh2024-07-151-1/+3
| | | | | | | | | | - Remove duplicates for the '--include-paths' cli option passed to shiboken generator, when creating a PySide module. In the context of PySide module creation, shiboken generator is called from CMake. Pick-to: 6.7 6.5 Change-Id: Ibb489ef76df1126e60470aef0d248d8267381da8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add shibokenmodule dependency for all _pyi modulesŁukasz Patron2024-06-191-0/+4
| | | | | | | | | | | | | | When building on Fedora rawhide, we sometimes end up running generate_pyi.py script while shibokenmodule is still being built, resulting in the following error message: ImportError: (...)/Shiboken.cpython-313-x86_64-linux-gnu.so: file too short Pick-to: 6.7 Change-Id: I500679bf12e4ba5a820db6c7971f8cdb0012b965 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Łukasz Patron <priv.luk@gmail.com>
* Android Deployment: Build wheels with macOS hostShyamnath Premnadh2024-06-032-7/+41
| | | | | | | | | | | | - Additionally, also move setting Python_SOABI manually for Android to where FindPython CMake module is called. This also aids in naming the wheel correctly. Pick-to: 6.7 Task-number: PYSIDE-2766 Change-Id: I73c089d31e2ee629f3ed676965fca27d53882110 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix building without QtOpenGLFriedemann Kleint2024-04-091-0/+15
| | | | | | | | | | Introduce a CMake macro to either add the dependency or an entry to the dropped items for typesystem parsing. Pick-to: 6.7 Fixes: PYSIDE-2649 Change-Id: Idb4e6d530075ab8c08c92e2e26d4de1bfd0459cf Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Allow to disable pyi file generation for debuggingChristian Tismer2024-01-171-1/+1
| | | | | | | | | | | | | When developing difficult stuff like Lazy Initialization, it is convenient to have an option that ignores PYI generation. This way, translation can be successful, and pyi generation can then be debugged. Task-number: PYSIDE-2404 Change-Id: I68bd10af3754de3988556c4558d1331564f5dadb Pick-to: 6.6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QtQuickTestFriedemann Kleint2023-12-241-0/+1
| | | | | | | | | | [ChangeLog][PySide6] QtQuickTest has been added. Fixes: PYSIDE-2543 Change-Id: I949a0e50a2e522589863ade1e2b2335be580a0d7 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Build: Fix super project buildShyamnath Premnadh2023-12-181-0/+4
| | | | | | | | | | | | | - option USE_PYTHON_VERSION can be removed as an option since it does not need to be cached. Also, the default value of empty string did not really work and instead the default value was always set to OFF. - ensure that Python_EXECUTABLE is found during super build. - Related d5b56ebb1534a3359f03534a967bbe3cf2a5eb51 Pick-to: 6.6 Change-Id: I2a90a17a738c91117bcd62ff5e25e4ac7b1d2be4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Shiboken: Remove FindPythonInterp and FindPythonLibs CMake modulesShyamnath Premnadh2023-12-111-1/+1
| | | | | | | | | | | | | | | - They were deprecated since 3.12 and removed in 3.27 - Use FindPython module as replacement - all the Python cmake variables resulted are renamed to their respective variable names as per the FindPython module instead of FindPythonInterp or FindPythonLibs module Pick-to: 6.6 Fixes: PYSIDE-2439 Change-Id: I1d3106e2cc9ee97e2d4f62d4e19e1a591d1021ad Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QRhi and related classesFriedemann Kleint2023-11-021-1/+4
| | | | | | | | | | | | CMake logic borrowed from the native interface patch. [ChangeLog][PySide6] QRhi and related classes have been added. Pick-to: 6.6 Task-number: QTBUG-113331 Change-Id: I9dd8b0b92f71027fc9f2c170af2993a5b09a4cfd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* CMake: Tell shiboken to process Qt headers inside system include dirsAlexandru Croitor2023-11-021-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building Qt For Python using yocto, the Qt headers are in a sysroot which libclang considers as system headers. Shiboken skips processing system headers. To ensure Qt headers are still processed, introduce a new --force-process-system-include-paths option to shiboken and two new CMake variables: PYSIDE_TREAT_QT_INCLUDE_DIRS_AS_NON_SYSTEM and SHIBOKEN_FORCE_PROCESS_SYSTEM_INCLUDE_PATHS. When PYSIDE_TREAT_QT_INCLUDE_DIRS_AS_NON_SYSTEM is set to true, the build system will pass the Qt include dirs to --force-process-system-include-paths to ensure the Qt headers are processed and their types extracted. Similarly SHIBOKEN_FORCE_PROCESS_SYSTEM_INCLUDE_PATHS can be passed a list of extra dir paths when creating non-Qt related bindings. Sysroots usually contain headers other than Qt headers, so there's a chance that a non-Qt-related system header fails to be be parsed and will fail the shiboken execution. To avoid breaking setups that previously worked because of the issue described above, the new options are opt-in rather than opt-out. In case one such an issue is encountered, the solution would be to copy / move the Qt headers into a separate location and specify the new location as both an include path and a force process system include path (in case the copied headers are still somewhere under the sysroot). Pick-to: 6.6 Task-number: PYSIDE-1958 Change-Id: I1733478e9c6057f84de7864940c6150b378749cf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Allow specifying a shiboken debug-level from the build systemAlexandru Croitor2023-11-011-0/+3
| | | | | | | | | | | | | | | The SHIBOKEN_DEBUG_LEVEL CMake or env var variables can now be set so that the build system passes that value to --debug-level of each shiboken invocation. The possible values are the ones that shiboken's command line parser expects: sparse, medium, full. This is useful for getting shiboken debug output in the CI. Pick-to: 6.6 Change-Id: I62d99e8f67884638449a69b10803aca3b1230e7b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Allow passing extra generator flags via a CMake variableAlexandru Croitor2023-11-011-5/+7
| | | | | | | | | | | | | | | | | | | | 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>
* shiboken6: Replace options related to nb_zero by nb_boolFriedemann Kleint2023-09-061-1/+1
| | | | | | | | | | | | | | nb_zero is Python 2 terminology. Rename the related functions and use new options. [ChangeLog][shiboken6] The command line options --use-operator-bool-as-nb_nonzero and --use-isnull-as-nb_nonzero have been replaced by --use-operator-bool-as-nb-bool and --use-isnull-as-nb-bool, respectivily to match Python 3 terminology. The old options continue to work. Change-Id: I1201f4b15e021c8df96740149c20fa1478c12ae1 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Enable DBus/HttpServer on WindowsFriedemann Kleint2023-08-011-6/+2
| | | | | | | | | | | | There was a comment about a clash of macro DELETE in Windows headers with some enumeration that was apparently renamed. Pick-to: 6.5 Fixes: PYSIDE-2402 Change-Id: I32d6da712a3388059cbbc0181f565ebfb82bd45c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add QtGraphsFriedemann Kleint2023-07-071-0/+1
| | | | | | Task-number: QTBUG-111305 Change-Id: I7ac79f59cfd0b85645d30485e86b6ff74bba20bb Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* CMake: Fix installation of pyi filesChristophe Marin2023-06-061-5/+1
| | | | | | | | | | | | | | 'file(GLOB ...)' cannot be used since these files are generated at build time. Patch by Julien Schueller. Fixes: PYSIDE-2184 Pick-to: 6.5 Change-Id: I33f614f7a18082ca274ef0580af08492121cf895 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Revive QtLocationFriedemann Kleint2023-03-071-0/+1
| | | | | | | It has been re-added to 6.5. Change-Id: I2a8b7889d1179c173a9c8d81b04e0a224c9cf0a7 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Add license headers to cmake filesFriedemann Kleint2023-02-164-0/+12
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Task-number: QTBUG-105718 Task-number: QTBUG-88621 Change-Id: I98bd2e80f182d8bf7aef6b633f37a428e2dac69b Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Remove unused FindQt5Extra.cmake fileFriedemann Kleint2022-11-291-25/+0
| | | | | | Pick-to: 6.4 Change-Id: I3208725f2870254a53faa3d1c208c2d2096334bc Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Build system: Use modern form of finding and linking Qt librariesFriedemann Kleint2022-11-291-3/+3
| | | | | | | Pick-to: 6.4 Task-number: PYSIDE-962 Change-Id: I91aed62a8e14bbc1101b4f23e25f57a5d6bca173 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Execute shiboken with appropriate PATH on WindowsAlexandru Croitor2022-11-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously one had to add the Qt bin dir and libclang.dll dir to PATH manually to ensure shiboken successfully runs when building Qt for Python using CMake without setup.py. This should not be necessary though, because the build system knows where Qt is (usually via the --qtpaths option) and where libclang is (via LLVM_INSTALL_DIR and friends). Introduce a CMake function that generates a batch shell script wrapper for a given tool. The wrapper will have PATH set to the Qt bin dir and libclang dir. Generate such a wrapper for shiboken and use it everywhere we call shiboken to generate bindings. The wrapper is only created on Windows. All mentions of Shiboken6::shiboken in custom commands now need to be wrapped in $<TARGET_FILE> because automatic target path conversion only happens if the target appears as the first argument to a custom command, and that is not the case anymore with the wrapper script being at the front. As a drive-by, the indentation of custom commands is now adjusted for easier readability and to conform with the indentation used in the Qt build system. Pick-to: 6.4 Fixes: PYSIDE-1844 Change-Id: I287adeedf234d0272c2963e96ae2aa5c4c0f0c83 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Add --lean-header optionFriedemann Kleint2022-11-031-0/+1
| | | | | | | | | | | | | | | | | | | | | Add an option that causes shiboken to generate forward declarations instead of includes where possible into the module header. This works since SbkType<> template specializations work with forward declarations. Includes are only required for certain classes (with enums, inner classes). [ChangeLog][shiboken6] An option --lean-header to generate forward declarations instead of includes into the module header has been added. This considerably reduces the dependencies but may require additional includes to be specified for injected code. Pick-to: 6.4 Fixes: PYSIDE-2099 Change-Id: I01f639e4ccce5ca25016dc2d52562abcc489a5ab Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Add Qt bin dir to PATH when calling generate_pyi.pyAlexandru Croitor2022-11-021-1/+11
| | | | | | | | | | To ensure the Qt modules can be imported, even if Qt is not in PATH. Pick-to: 6.4 Task-number: PYSIDE-1844 Change-Id: I64d939c0323980ce2292b48ca59cef138a979ebc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Build system: Remove some outdated version checks in CMake filesFriedemann Kleint2022-10-211-3/+1
| | | | | | | | Task-number: PYSIDE-2091 Pick-to: 6.4 6.2 Change-Id: I2f54fb9016cdcf75e44bcd15cbb84370a482569d Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide: Enable override of PYTHON_SITE_PACKAGESShyamnath Premnadh2022-10-181-1/+3
| | | | | | | | | | | - Set PYTHON_SITE_PACKAGES if unset, while building PySide Pick-to: 6.4 Fixes: PYSIDE-2074 Change-Id: I8bbc3ebd8587dddeca9f5ca38077aad6a6169588 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add QtSerialBusFriedemann Kleint2022-10-141-0/+1
| | | | | | | [ChangeLog][PySide6] QtSerialBus has been added. Change-Id: I661912279fa03b51d19483b603fff830ede225a9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>