summaryrefslogtreecommitdiffstats
path: root/src/core/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Use generator expression to get moc pathMichal Klocek2021-09-011-6/+1
| | | | | | | | | | | | | | | | | | | We used IMPORTED_LOCATION for getting moc path, however this will not work in case of top level builds, since moc is not "imported", we can not use LOCATION due to https://cmake.org/cmake/help/latest/policy/CMP0026.html Use generator expression to set the moc path for gn. Clean up RSP_PREFIX leftover from previous gn version. Note QtPdf does not even need moc setup since we just need pdfium library. Task-number: QTBUG-95590 Change-Id: Ief3dca96f65e198e9693293316b1a90007c56355 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 53e99bd479f74c5399664d26e35e392875da8fb5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add workaround for not working linking with bfd linkerMichal Klocek2021-08-301-0/+3
| | | | | | | | | | | | | | | | | Removal of external project removed also workaround for coin bug, which is still not fixed. Add linker launcher in case maximum number of open files is below 4096 on linux for WebEngineCore target. This launches bash script wrapper which sets ulimit. This is poor man workaround and requires cmake 3.21 to work. Task-number: COIN-699 Task-number: QTBUG-95590 Change-Id: Ib9d0c4ced988d4692746e51f3abbe63ff5085836 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit c18a4d6f354838ea3edfb18d31007237dad08aa6)
* Rewrite gn-cmake integrationMichal Klocek2021-08-301-132/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous gn-cmake integration was driven towards having the complete cmake build tree which included gn build artifacts. These were marked as IMPORTED in cmake build files, this way cmake "knew" all object files and static libs coming from gn. To achieve that we needed to run the cmake configure twice. First to feed gn with the build information from cmake and then the second run to import all the build information to cmake based on gn run. As a side effect of this the first run cmake was creating incomplete targets, so we could use generator expressions to gather all the data needed for gn run. The second run of cmake was able to create fully initialized targets. We used 'external project' to run cmake the second time. This approach worked well when doing "module" builds and having two targets, one in the main project and one in external was not an issue. Moreover, this approach could be integrated nicely since CI does only "module" builds. Unfortunately "top level" builds are implemented to import all qt targets into one build tree. This created issue for qtwebengine since fully initialized targets were 'hidden' by 'external project' and including half baked (dummy) targets from the main project resulted in bunch of issues related to the dependency tracking and build race conditions. Also using 'external project' complicated installation rules and in the end installation worked differently than in other modules. With current approach we use response files, so we hide all build artifacts coming from gn and feed cmake with those response files. This way we run the cmake configure once and we create all the targets once. Using rsp files hacks linker options in cmake, so this approach is sub-optimal, however allows to have working "top level" builds. It is worth mentioning here that the final module linking has to take place with cmake's part of build since doing one static lib in gn is not possible due to the toolchain limitation (msvc is not able to process static libs over 4Gb and has no support for thin archives, so only a shared lib is doable at time of writing) Following changes are made: * remove 'external project' for qtwebengine target, we keep it however for ninja ,gn and a host project * call gn from cmake in a scripting mode during build and not configure run, this way BUILD.gn is assembled as a build step so after generator expressions are executed * BUILD.gn is assembled now from 4 files: - root template BUILD.root.gn.in - compiler data gn_config_c.cmake, gn_config_cxx.cmake - sources data gn_cofnig_target.cmake * since we use gn wrapper script use gn.args file to pass arguments instead of a command line, so this file can be now easily modified when running gn and ninja 'manually' * since a script mode does not support handling of properties with TARGET as such, use the DIRECTORY scope in some of our functions which handle GN_TARGET * use qt_build_repo() in main CMakeFile and remove all coin and top level build hacks * remove 'external project' for examples and tests, this is no longer required as all qt targets are not hidden by external project * remove leftovers from gn feedback call used for GN_TARGET * improve installation rules, WebEgineCore target is not by default installed during build, therefore we need to copy resources and translations to root so tests and examples still can be built without a module being installed first * adjust GN lookup paths, we look for gn in main configure and during scripting mode when gn is executed Fixes: QTBUG-94349 Fixes: QTBUG-94709 Fixes: QTBUG-94922 Fixes: QTBUG-94997 Fixes: QTBUG-95051 Fixes: QTBUG-95152 Fixes: QTBUG-95158 Fixes: QTBUG-95972 Task-number: QTBUG-95231 Task-number: QTBUG-95590 Change-Id: I5e7a34287ee59d904103fe310fc7c6a36a8dfbc9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit bd75c51f2a7f7384d3303e86764211cb3e32f03d)
* Add 'amazing' windows linker workaround for rsp filesMichal Klocek2021-08-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should be part of previous patch, however it deserved separate commit message with explanation. On windows cmake generates ninja rules with cmake wrapper for linker in form of: cmake.exe -E vs_link_dll vs_link_dll internal command unfortunately expands all rsp files passed to liker before calling it (it looks for '@') and also swaps the order. This ends in bogus linker call. Make a workaround based on: https://github.com/Kitware/CMake/blob/master/Source/cmcmd.cxx#L2102 Use response files prefixed with 'CMakeFiles' so internal command of cmake will skip the processing. Since rsp files must now start with filename and not with filepath we also need to copy them to directory where we call the linker. Task-number: QTBUG-95590 Change-Id: I8e96ebf3a9ac7c7d751db6682ce37f38880be793 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 9f4914248a2bf447d4728bc6bc8361dbbfc8709f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use rsp files directly from gnMichal Klocek2021-08-301-6/+9
| | | | | | | | | | | | | | | | | | | Do not use gn created cmake files since this requires cmake configuration step, which currently ends up in duplicated targets in main and qtwebengine external project. Use response files instead, so we can remove duplicated targets in follow up patches. This approach unfortunately has downside of cmake not being aware of gn build artifacts and hacks directly linker command. For universal builds remove not needed rsp template, since we can now use rsp files directly generated by gn. Task-number: QTBUG-95590 Change-Id: I83282ba68fa171cada7236d0587be27122315dec Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 96e47e1c9b6ce5c71e2560bb95f6e59ce062c8ba) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Apparently we build fine with node.js 10.19 on UbuntuAllan Sandfeld Jensen2021-08-201-1/+1
| | | | | | | | | Fixes confusing configure output Change-Id: I17812524e3452d3b271a677d3877d1365ccfc38f Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 900c5d96a5c85b24eafddef78546423259898259) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Refactor gn targetMichal Klocek2021-08-181-110/+49
| | | | | | | | | | | | | | | | | | | | | Currently we get hangs on ci, to investigate the issue go through current cmake code and: * remove all dummy ninja targets * remove implicit dependencies * build dir in form of buildDir/config/arch * separate ninja call for sandbox * separate ninja call for covert_dict * clean up universal build * change handling of rsp files, so they are generated during build and not configure time * refactor functions so universal build can be easily used by follow up qtpdf patch Change-Id: Id4a6c61b87fe76832232035fddf212b57051d0ec Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 58b787cbad581914367aea4604993cce30a65d06) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QtWebEngineProcess: fix installationLi Xinwei2021-07-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 09e5da6ac44c01ae0de34b789c42da515e82f07c, we pass "NO_INSTALL" to qt_internal_add_executable(), so we have to handle some installation issues manually. Use qt_get_cmake_configurations() instead of get_install_config(). Because get_install_config() only returns the first config in a multi-config build, this causes the debug executable not installed. We can install the debug executable to ${INSTALL_LIBEXECDIR}/Debug, like other executables, to avoid conflict with the release executable. But this will make installation codes very complex. So I propose to restore Qt5's behavior for it , add a "d" suffix to the debug executable and install both executables to ${INSTALL_LIBEXECDIR}. This can also avoid breaking windeployqt's logic of finding the debug executable of QtWebEngineProcess. Also adjust the output directory property to place executables under the correct directory. The release executable should be placed under ${QT_BUILD_DIR}/bin rather than ${QT_BUILD_DIR}/bin/Release. Given that the debug executable now has a "d" suffix, it can also be placed under the same directory. And install PDB files manually because QtWebEngineProcessd.pdb should be installed to ${INSTALL_LIBEXECDIR}, but qt_internal_install_pdb_files() will install it to ${INSTALL_LIBEXECDIR}/Debug. Change-Id: I38b5e8d9ed939b88de86ab5722dd56777442ed03 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 7846457b067491ffb289e625282b1e89074253ee) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add support for macOS universal buildsAllan Sandfeld Jensen2021-07-231-395/+436
| | | | | | Change-Id: I416036a925167204cf5121108922911bce854352 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 35144cbc3a285029574ea3ef45e4a6790f9607e4)
* Remove IPC message loggingPeter Varga2021-07-231-1/+0
| | | | | | | | | | Doesn't seem to be useful, chromium community doesn't maintain it anymore. Change-Id: I24071d6319c258f2d88f3bde5c38dd9fddeec9a8 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit b6c57f4eeeca503e643cf8b3ddc1ec70bfe75886) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Refactor cmake buildMichal Klocek2021-07-221-231/+32
| | | | | | | | | | Add macros to share common cmake code blocks with QtPdf. Reconsider later to do proper scoping and change those to functions if make sense. Change-Id: I500acdba1415feab373a012dcf9a9ddedf33cfac (cherry picked from commit b3031066d17ef01802a4c9752f87675d6a4a1df5) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Silence GCC warnings in corePeter Varga2021-07-211-0/+14
| | | | | | | Change-Id: I0aabf0d5baec8ba0a4a127d4c5dccf013d775ea2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit ed462df2882dab990f00c5623d35e5fbd86416c3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Adaptations for 90-basedAllan Sandfeld Jensen2021-07-131-12/+27
| | | | | | Change-Id: I8402b044d8e12d75e144a00984b856f3de10bffd Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> (cherry picked from commit 1d988d971bc4270ba3d148e8e2c143bf8f625b6e)
* Add arm optimization flags to cmake buildMichal Klocek2021-07-071-0/+34
| | | | | | Pick-to: dev Change-Id: Ibab4630fd226f46f58d08c603436dc2c378212ec Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix build with system ICU libraryKirill Burtsev2021-07-021-23/+10
| | | | | | | Change-Id: Ic4c3a0f2a187d25c92b76e06f9c5764cafc1e5a9 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit fa11a593ee0b263335dbb1d4212bf3c7604f0643) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add cross compilation support to cmake buildsMichal Klocek2021-07-021-11/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add arm cross-compile basic support. CMake does not support host builds. However we do host build with gn and changing that would require an extra effort to keep all necessary changes with Chromium upstream. Therefore let gn to perform the host build for required tools and just feed gn with all the build data. Add new build steps: * install gn into QT_HOST_PATH/libexec. * run hostBuild project to get native architecture and compiler * call PkgConfigHost to pass pkg-config paths to gn * create wrapper script for host pkg-config to escape yocto shell pkg config exports This change also splits gn toolchain into 3 toolchains host,target,v8 Now hostBuild provides host and v8 toolchain in case of cross compile. The build optimizations will follow in another patch. Fix not existing 'boot2qt' condition and enables more test on QEMU. Note this is tested only with yocto based images. Pick-to: dev Task-number: QTBUG-91760 Change-Id: Ic2bea12229acc71fbd36a848e9ed4fed7e14b485 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Implement dialogs of File System Access APISzabolcs David2021-07-011-0/+1
| | | | | | | | | | | | | | Dialogs triggered by window.showOpenFilePicker() or window.showDirectoryPicker() needed different implementation than regular file picker dialogs. Since the end-users can't distinguish between HTML file picker dialogs and these file system access dialogs, we can just use the existing file picker WebEngine API and UI delegates. Task-number: QTBUG-92519 Change-Id: Ib1624f80603c4042803303274ba45d864ecb371c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 46a2f0f3137dcb46f2752130bbee6438742c27ac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Pass compiler wrapper to GNAllan Sandfeld Jensen2021-06-301-0/+3
| | | | | | | Change-Id: I1ce6e9d0e03bb780f85636865e15552ac28876fa Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 1efcf20bcc1d41edb56d4ef491dc9c26b7a98f15) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Enable jumbo-builds for windowsAllan Sandfeld Jensen2021-06-301-7/+2
| | | | | | | Change-Id: I08c702aadce949d3dce6e081476978bb8dcbee32 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 28d3d74ac32dcd16969a17ab4bb08b11c18c7f4e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add sanitizer to cmake buildMichal Klocek2021-06-251-0/+18
| | | | | | | Change-Id: Ia88bb23bbefcaef12a3140a62464cda47c24cd73 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> (cherry picked from commit 7016622bc83be39949d8399ea4c2825a5e5e05ee) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add DisplaySkiaOutputDevice for skia-on-gl renderingJüri Valdmann2021-06-221-0/+1
| | | | | | | Change-Id: Ia855e60e74f79a5750e68f2b97ccba1e747a3ef6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit b11790982532b04d63c45f1e985cb45f75370e9a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix clang-cl buildsAllan Sandfeld Jensen2021-06-181-3/+10
| | | | | | | 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>
* Add spellchecker support and qwebengine_covert_dict to cmakeMichal Klocek2021-06-151-24/+21
| | | | | | | | | | 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>
* Clean up runAlways targetMichal Klocek2021-06-151-3/+5
| | | | | | | | | | | | After refactorings this can be now simplified and fixes windows warnings about target duplication when multi config is used. Remove extra target and leave as command output, which is never created. Change-Id: I4930e9309a639e8853ba9f6c03ee51bc71ade5c6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 4e9f6d8ae453284cdd167b69ceab0d81aafeb327) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Enable native arm64 builds on macOSMichael Brüning2021-06-151-0/+6
| | | | | | | | | | Chromium builds on arm are still experimental, but we want to enable them in the CI in order to see when things break. Change-Id: I9e37fd97eb5a3dc680dc16404c22b97f780b4b9f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 712702757f105aa2390b00c8412950967aa1e881) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace FaviconManager with Chromium's Favicon ComponentPeter Varga2021-06-041-1/+2
| | | | | | Task-number: QTBUG-51184 Change-Id: Ie050cb23f2c86841a66ec384bfbcdf0713cffa7c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@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>
* Add support for top-level configs and developer buildsAllan Sandfeld Jensen2021-05-251-1/+21
| | | | | | | | | | 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 not working ninja multi config on coinMichal Klocek2021-05-221-27/+40
| | | | | | | | | | | | | | | | On coin we call cmake --build . and we do not specify the config expecting that all configuration are build. However, when using the custom command for ninja build dependencies are incorrectly resolved by cmake and the ninja step is only executed in "default" config context. This breaks debug builds. Cmake 3.20 fixes the issue by adding genex to OUTPUT and support for OUTPUT_CONFIG. Create workaround for now and revert it when minimum version of cmake is bumped to 3.20 Change-Id: Iafaedb5f605ed9195dd4ecaa34d2dff19b7225a6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add windows to the cmake buildMichal Klocek2021-05-221-4/+45
| | | | | | | | Fix cmake for windows builds and add QtWebEngineSandbox target. Task-number: QTBUG-91760 Change-Id: If962a81ddfb509d104ad8ffbfbf34f1150ae82ce Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add mac builds to cmakeMichal Klocek2021-05-221-13/+58
| | | | | | | | | | | 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>
* Refactor and create gn targetMichal Klocek2021-05-221-164/+537
| | | | | | | | | | | | | | | | | Refactor the gn handling and add: * the gn target for encapsulating resources needed to run chromium builds * the support for SOURCES, INCLUDES, DEFINES, COMPILE OPTIONS. * the multi config support for cmake and enable debug, release builds * CONDITION evaluation for the gn target and the gn arg list * the linux specific config and all missing source sets * use REALPATH instead of ABSOLUTE, this fixes missing drive letter on windows Task-number: QTBUG-91760 Change-Id: Ib283d8ab817ff36ee9c94c2b8f44785709c45258 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 QtWebEngineCore module cmake buildMichal Klocek2021-05-191-17/+164
| | | | | | | | | | | | | | | | | | | | | 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/+4
| | | | | | | | | | 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-0/+5
| | | | | | | Task-number: QTBUG-91760 Change-Id: I56aaf6af42eb1877acbc0faf4e125bc8de4c72fb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Setup cmake projectMichal Klocek2021-05-121-0/+57
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>