aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* Mark RegExpJitTables.h as non-module headerAlexey Edelev2023-04-031-1/+3
| | | | | | | | | | RegExpJitTables.h should not be processed by syncqt and should not be installed. So disable any postprocessing of the header by setting the _qt_non_module_header. Pick-to: 6.5 Change-Id: Ib91399bacea5f792559a2ae2274bcdcb8ae9ae8b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Make Sure that `qml_compile_hash_p.h` Isn't MissingAmir Masoud Abdol2022-10-261-0/+2
| | | | | | | | | | | | In the event of an unexpected build directory corruption, CMake may fail to replace/install the `qml_compiler_hash_p.h` properly. I have had similar errors with other files missing as well, so this fix might be applicable to elsewhere as well. Pick-to: 6.4 Change-Id: Ife3e28a09296b5428d0f0248648caabda601c94d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Mark files generated by add_custom_command with the GENERATED propertyAlexey Edelev2022-09-271-0/+2
| | | | | | | | | | | Old CMake versions don't set the GENERATED property to TRUE automatically for files that are generated by add_custom_command calls. Add the flag explicitly for guarantee the correct work of functions that may use it. Task-number: QTBUG-87480 Change-Id: Id3e924a9ae12f6a67f5280b8f369f0da84ac2bbf Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add qml_compile_hash_p.h to the Qml module sourcesAlexey Edelev2022-09-221-0/+1
| | | | | Change-Id: I0b607cda3e6e22d558010da5d405ed9cb017a914 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-09-071-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: Id89ed14990804a5024183e75382cc539d4293da1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-081-0/+3
| | | | | | | | | | | | 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. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I72c89a98c42bbc9234d8495e9e503bec81d11037 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add VERBATIM option to add_custom_command callsAlexey Edelev2022-03-311-0/+1
| | | | | | | | | | | Use VERBATIM option to prepare the correct command line for the add_custom_command. This especially sensitive when using build directories with names containing special symbols, that cannot be handled by shell correctly. Change-Id: Ic6ea2a557fe4e7ccc1d2a0c5c4ab707223c0b91a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Skip qml compile hash recreation in developer buildsAlexandru Croitor2022-02-121-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation favors recreation of the hash whenever the git tree hash is changed and a cmake reconfiguration is forcibly done by the developer. This causes a rebuild of the Qml library. This dependency tracking is too coarse and not very helpful. A developer that doesn't touch the Qml library sources will be confused why a commit rebuilds the library. A developer that does touch the Qml library will be confused why the qml hash hasn't changed after running ninja, and even more confused when it is changed after a commit and reconfigure. To improve the situation a bit, the build system will now not recreate the hash when doing a developer build and the developer will be expected to remove the already existing hash file when necessary. This will not cause issues in our CI developer build configurations where cache files are not removed. Even though the cache files are not removed, the qtdeclarative build directory will be clean, which means the qml hash file will not be present and will be created with up-to-date content, thus invalidating all cache files. Pick-to: 6.2 6.3 Change-Id: I809b2cffbc5bb2b09af4fb712c7e46a743bfd333 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Restore comment describing how the compile hash worksUlf Hermann2022-01-261-1/+5
| | | | | | | | | This is really useful information and had to be painstakingly re-discovered. Task-number: QTBUG-99608 Change-Id: I21f7fc56745c9fb979f61710bebd8ad83e702cc4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use tree hash rather than commit hash in .tag fileUlf Hermann2022-01-251-1/+1
| | | | | | | | | | We want equal source packages to have the same .tag file, even if their commit hashes differ. Pick-to: 5.15 6.2 6.3 Fixes: QTBUG-99608 Change-Id: Ide5047acec78fdd91617577b3c2125feb0b2bdf4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fall back to a cmake generated compile hash when git failedVolker Hilsheimer2022-01-241-1/+3
| | | | | | | | | | | | | | Even if we have git, the source tree might not be a git repository, or git might fail for various reasons. So always fall back to the cmake- generated QML compile hash when it's empty after trying the .tag file and git. Amends a1bba5cd3d5f8a88cd79e6f56149ab88d1abe8b8. Pick-to: 6.2 6.3 Change-Id: Ie9f5642bbfc0cead40138d1f92fe3d673f6dc372 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Fix lookup of Python for qtdeclarativeAlexandru Croitor2022-01-201-15/+1
| | | | | | | | | | | | | | | | | | Always use FindPython instead of find_program because the former looks for Python in more locations (like the Windows registry). We switch to FindPython instead of FindPythonInterp because the latter is deprecated, and the former is available in our minimum support CMake version (3.16). Because find_package is called in configure.cmake that is called by a function() call, we need to make the found interpreter a cache variable to make it available outside of the function. Pick-to: 6.2 6.3 Fixes: QTBUG-99273 Change-Id: Idb6620a01b4b5764f130f9dc5780d73cd2151965 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: If no git and no tag file are found, compute compile hashUlf Hermann2022-01-141-14/+17
| | | | | | | | | | In that case we can just hash all the source files in src/qml to get a reasonable approximation of a compile hash. Pick-to: 6.2 6.3 Change-Id: Ifaf2c8145ab16d9f8d23570fa9acbb7a76ebda03 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix handling of QML_COMPILE_HASHUlf Hermann2022-01-071-7/+21
| | | | | | | | | | | We need to check for the contents of the tag file, not its name. We need to strip the contents before checking. We need to run git in the right directory. We need to fail if we cannot find any QML_COMPILE_HASH. Pick-to: 6.3 6.2 Task-number: QTBUG-99608 Change-Id: Ic42a073b196143f8576a84e7a4531b5f2927fb68 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Fix missing 'We mean it' warning for generated qml_compile_hash_p.hKai Köhne2021-03-311-7/+1
| | | | | | Pick-to: 6.1 Change-Id: I327d377c80749741274a76dfa609417c005bf6c7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Regenerate configure.cmake filesAlexandru Croitor2020-06-041-0/+12
| | | | | | | | | This will cause cmake to show the usual configure reports. Needed to add a custom function to find python (not currently used though, except for the configure report). Change-Id: Id68efc5badeaa30834a37fe751c1d5b6bfd96d92 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Update metatypes dependency calculationLeander Beernaert2020-02-101-10/+0
| | | | | | | | Retrieve the list of dependent metatypes.json using the new source interfaces. Change-Id: I6ab57f370864031f2dbd097f14c3ebe6e7601d61 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update qmltypes to use the new metatypes dependency formatLeander Beernaert2020-01-291-0/+10
| | | | | | | | | | | | | | | The foreign types list for qmltypesregistrar is now generated by recursively processing the ${targets}_metatypes_dep.txt file. At build time we now use a custom script (Qt6QmlResolveDependencies.cmake) to generate the final foreign types file. qmltypesregistrar has also been updated in order to support the resolution of response files supplied to the command line arguments. Change-Id: Ib61d82fa92bf5d5a24631f461248f81147aad947 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake Build: Use find_package(PythonInterp) instead of "python"Cristian Adam2019-09-231-1/+2
| | | | | | | | | | | I had python3 installed on Windows, which doesn't have python as executable. find_package(PythonInterp) finds the right executable and it simply works. Change-Id: I69bf8e4dfbe29de56109fe1927569000d710c3f5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Initial CMake portAlexandru Croitor2019-06-031-0/+47
Crude port of QtQml, QtQmlModels, QtQuick and a few tests and a few examples. Task-number: QTBUG-74136 Change-Id: I5de4d8215b33d1a4a72c2c0e7951e4b384f27e3e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>