summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Add 'testsupport' to cmake buildsMichal Klocek2021-06-281-0/+1
| | | | | | | | | | This enables running more tests. Fix issues with tst_qquickwebengineviewgraphics. Change-Id: Ib223b4e723a7192c18202e8d5dd65d83872f3336 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 4e92dc14b86655154f70e8a1093cc9f3aae1604f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix clang-cl buildsAllan Sandfeld Jensen2021-06-181-0/+2
| | | | | | | Change-Id: I57d3c057e076445f902da509655728cb20a4a18b Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit c8643e47b0ba8dc0f345c2feaabfa60e54f809c3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Ensure libs project is reconfigured when the root project isAlexandru Croitor2021-06-151-0/+5
| | | | | | | | | | To ensure that correct CMake and qmake support files are used when building examples. Change-Id: Ic52ee7f7153877071ab3883fd436ad888f90680d Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit f04bc6833c01efc0fb37d6f6c31c6fa427087664) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add spellchecker support and qwebengine_covert_dict to cmakeMichal Klocek2021-06-151-0/+1
| | | | | | | | | | Add spellchecker dictionary conversion tool. Change scope of gn object imported variables to function scope. Change-Id: Ice579a89e20b80034b675e7f767a774100478472 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 9451ceee24e832d32a86ae6a2f37eea781acaa2f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix "examples" and "tests" target name collisionsPeter Varga2021-06-101-5/+5
| | | | | | | | Fixes: QTBUG-94333 Change-Id: I1e9b4c3f042dc370441e062288f5f9689d31c091 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit b8804bf868c9f9b18a8b1caa9f512659113ddb98) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace calls to obsolete cmake functions with modern alternativeFabian Kosmale2021-06-071-0/+3
| | | | | Change-Id: I5674d887a73a6a693d1babc416470c9873491eb3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add support for gn versionMichal Klocek2021-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Check the version before using gn, since some systems can have already gn installed. In case of cross builds gn is installed into host qt and can simply end up in /usr/bin path of x86_64 sysroot in case of yocto builds, meaning it will be picked up by the host system path. Moreover, findGn.cmake is also going to be installed and should not just look for non existing builds paths. One can also avoid pointless recompilations of gn for every single clean build. Gn can be easily installed by simply building the "gn" project: cmake path/to/qtwebengine/src/gn cmake --build . --parallel cmake --install . Note setting DCMAKE_INSTALL_PREFIX and/or DESTDIR can install gn to desired location. Change-Id: Ie8f989c838dad2e6e7e346a4f6a861e187ec037f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Use fixed qt_add_resource BASE argumentPeter Varga2021-05-281-0/+3
| | | | | | Task-number: QTBUG-86726 Change-Id: I33ec2a73254d9b44de83f4f5491f372b4bb9959b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add support for top-level configs and developer buildsAllan Sandfeld Jensen2021-05-251-0/+7
| | | | | | | | | | Guess a toolchain link for top-level builds. Copy the resources to their final destinations, and search for the helper process where it is build in this config. Change-Id: Ie9e829c19d42dddb85df188e48ec269f85268ed4 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix build of qmake examples on coinMichal Klocek2021-05-221-0/+5
| | | | | | | | | | | | | | | | Coin compiles examples with qmake during cmake build, unfortunately this fails to have proper includes. The reason is that during the build qt-cmake creates dummy mkspecs files even for targets excluded from 'all'. (targets we use for genex execute). These files later are sucked by qmake instead of installed pri files since the source tree is tainted on coin due to doing in-source builds. Add a workaround for now and make sure dummy mkspecs are removed. Task-number: QTBUG-93694 Change-Id: If288809b336055a170baa82b7a75d8e9ae46f988 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add the ulimit workaround for coinMichal Klocek2021-05-221-0/+15
| | | | | | | | The linker on coin needs to open many files. Task-number: COIN-699 Change-Id: I2819c2608a789387c260bab11276542103157983 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fake artifacts on test nodesMichal Klocek2021-05-221-0/+2
| | | | | | | | | | | If the build node was skip due to missing requirements, the test node still tries to download artifacts. Add the workaround for now. Task-number: COIN-707 Change-Id: Ib5332b6f5af82a77ac2cf702f5be4abf3fb075a0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add mac builds to cmakeMichal Klocek2021-05-221-7/+9
| | | | | | | | | | | We need to pass -F or -iframework to gn as a compiler flag, however cmake keeps this parameter as include dir and adds internally "-iframework QtFoo.framework/.." for the compiler call. This internal handling can not be accessed with the genex. Add the manual conversion. Task-number: QTBUG-91760 Change-Id: Id12831432ccb0516be52f79bd5f6cfcbe7e87d9c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Bump the minimum required cmake version to 3.19Michal Klocek2021-05-221-1/+1
| | | | | | | | | | | QtWebEngine requires support of TARGET_PROPERTY for genex in gn template generation to dump all compilation flags. This is supported since version 3.19, set examples to 3.16 as rest of the qt. Task-number: QTBUG-91760 Change-Id: Ifa5903c8c6efcb160db05baf1e18c865b48bcf39 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add tests to the cmake buildMichal Klocek2021-05-221-0/+32
| | | | | | | | | | | | | | | | | | | | Use QT_TESTCASE_SOURCEDIR instead of TESTS_SOURCE_DIR. Introduce Test::HttpServer and Test::Util targets. Query shared data location from server. Clean up "shared" resources. Note QT_TESTCASE_SOURCEDIR must be turned into the canonical form since the user can call on windows: "cmake \path\to\foo" instead of "cmake c:\path\to\foo" which will break all file:// urls. Note this patch breaks qmake builds. Task-number: QTBUG-91760 Change-Id: Ibc1f904ac9acd375d1ff70ff80f0c533497e3f20 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add examples to the cmake buildMichal Klocek2021-05-221-0/+13
| | | | | | | | | | | | | Add only quick and widget examples to the build for now. Update examples qmake files so the ci can also build qmake examples after the cmake bulid. Note this patch breakes qmake builds. Task-number: QTBUG-91760 Change-Id: Ia867a49bc3deab1967bdedcf525ad4afe3967c2a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add WebEngineWidgets, WebEngineQuick modules cmake buildMichal Klocek2021-05-191-0/+2
| | | | | | | | | Fix some library dependencies and make proper header includes in core. Task-number: QTBUG-91760 Change-Id: I415361dd42ef2cc39716ce3f5f56e6e8556ac4c8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add QtWebEngineCore module cmake buildMichal Klocek2021-05-191-8/+20
| | | | | | | | | | | | | | | | | | | | | Create QtWebEngineCore, QtWebEngineProcess and drive headers sync from the libs project. Main project build should not generate any header files, since the logic in qtbase assumes fixed QT_BUILD_DIR, which is by default CMAKE_BINARY_DIR for prefix builds. Drive all syncqt calls from the libs project and leave the main build just for the feature evolution and the build summary reporting. This fixes header installation issues, however this patch requires also sync.profile update which is done later, to keep the qmake build still functional. Note this patch only adds debug builds for linux. Task-number: QTBUG-91760 Change-Id: I516c26206baa1cf6b966629a694dadce7f79dbec Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add BUILD.gn generation for the gn root and gn toolchainMichal Klocek2021-05-121-0/+1
| | | | | | | | | | Use simple templates. This will get own target in followup changes. Task-number: QTBUG-91760 Change-Id: I0b6991f7b54183aa9fb667cec5ad347f66c78b99 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Pass qtfeatures from the main project to the lib projectMichal Klocek2021-05-121-3/+13
| | | | | | | Task-number: QTBUG-91760 Change-Id: I56aaf6af42eb1877acbc0faf4e125bc8de4c72fb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add configure.cmake filesMichal Klocek2021-05-121-0/+31
| | | | | | | | | | | | | | | | Only evaluate features in the super repo and do not create config headers files during the configure step. However, print the build summary. The build config headers will be created during the configure step of 'libs' external project. Done-With: Jüri Valdmann <juri.valdmann@qt.io> Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Task-number: QTBUG-91760 Task-number: COIN-711 Change-Id: I481525571e71ca4684de5827f641416035a8f22a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Setup cmake projectMichal Klocek2021-05-121-0/+71
Add the top level cmake project and ninja and gn cmake builds. Make ninja and gn build optional. With qmake we had four stages during the build: * configure (initial dependencies check) * qmake (build ninja, build gn, run gn) * make (compilation) * make install With cmake we have some limitations: a) we need to pass the build config to gn, however cmake evaluates generator expressions during the generation phase this means we need a recursive call to cmake b) qt-cmake qtbase logic (+syncqt) assumes "fixed" build locations to handle deployment of headers and libs (it uses CMAKE_BINARY_DIR for QT_BUILD_DIR) c) cmake can not run twice in the same build directory d) running recursive/child cmake, makes all generated targets not accessible during configure time of parent's cmake e) cmake can only "build" things for subdirectories To deal with mentioned limitations and to keep things simple we will split those steps into separate projects: * SUPERBUILD - this project does dependency checks, only evaluates features to show the build summary and passes them to EXAMPLES,LIBS,TESTS projects, it also runs the generator expression to feed LIBS project's cmake, it does not try to run syncqt as result of (b) and (c) * NINJA (build ninja) * GN (build gn) * LIBS - projects runs simplified feature evaluation (CONDITIONS resolved by SUPERBUILD cmake) to generate build headers (+syncqt), it also runs gn during configure and does all libs compilation. The project's source root must be "src" directory as a result of (a),(b),(c) * EXAMPLES - builds examples as a result of (d),(e) * TESTS - builds tests as a result of (d),(e) Each of projects will have three stages: configure, compile, install. Task-number: QTBUG-91760 Done-With: Jüri Valdmann <juri.valdmann@qt.io> Change-Id: I3b44decefa17f177e5e07c563796aa158a0b0ecb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>