summaryrefslogtreecommitdiffstats
path: root/configure.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Add workaround for not working linking with bfd linkerMichal Klocek2021-08-301-0/+9
| | | | | | | | | | | | | | | | | 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-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Apparently we build fine with node.js 10.19 on UbuntuAllan Sandfeld Jensen2021-08-201-2/+2
| | | | | | | | | 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>
* Currently we require ICU >= 68Allan Sandfeld Jensen2021-08-191-1/+1
| | | | | | | | Fixes: QTBUG-95564 Change-Id: Ic3d018b9f3be245a382baf169ba4231663aa0b3d Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> (cherry picked from commit 4e7267773b8b2f7b6e0bdf01c06d77967e299b9f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Disable qtpdf build for 6.2Michal Klocek2021-08-181-0/+1
| | | | | | | | QtPdf it is not relased with qt 6.2. Task-number: QTBUG-95353 Change-Id: If31b6e5f37afdb59cb8d721b33b00eda9fd9e1ff Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add QtPdf to cmake buildMichal Klocek2021-08-181-44/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port QtPdf to Qt6: * QtPdf,QtPdfWidgets,QtPdfQuick libs * QtPdfQuickPlugin, QtPdfPlugin (imageformat) plugins * widget and quick examples * qtpdf tests To fit gn cmake integration and new repo layout code is a bit reshuffled. Compared to qmke build following features are not ported yet: * ios fat libs * qtbase 3rdparty static dependencies WebEngine build can be skipped with setting QT_FEATURE_qtwebengine_build=OFF Note this patch needs follow up for 6.2 branch to disable qtpdf builds by default, since this should not part of qt 6.2 release. Task-number: QTBUG-95353 Change-Id: I4dd9f3934bdd478fb6d2fa686074a24d91f09953 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 79d04aa9e3e9aa84d7378260519f9e9a6759dc41) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: use correct condition for system gnSamuli Piippo2021-08-091-1/+1
| | | | | | | Change-Id: I853adbd3fcf2f5e34a1ddd10e4f9a971a65d03b9 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 3b88c1fce6e6f852bc1d268ed007f951e3648200) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add support for macOS universal buildsAllan Sandfeld Jensen2021-07-231-9/+1
| | | | | | Change-Id: I416036a925167204cf5121108922911bce854352 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 35144cbc3a285029574ea3ef45e4a6790f9607e4)
* Adaptations for 90-basedAllan Sandfeld Jensen2021-07-131-1/+4
| | | | | | Change-Id: I8402b044d8e12d75e144a00984b856f3de10bffd Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> (cherry picked from commit 1d988d971bc4270ba3d148e8e2c143bf8f625b6e)
* Add cross compilation support to cmake buildsMichal Klocek2021-07-021-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add checks for xrandr and xdamageAllan Sandfeld Jensen2021-06-281-2/+4
| | | | | | | | Fixes: QTBUG-94759 Change-Id: Ie9a8fffc93fdf5564959965baae1ef9391f3307c Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 13c62c0905d669bd4fd1ac151a82fe0232a92f13) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix cmake build error when missing Python2Dimitrios Apostolou2021-06-201-2/+2
| | | | | | | | | | | | | | | Fix the following error: cd /path/to/qtwebengine/build && cmake -E cmake_echo_color --red QtWebEngine\ will\ not\ be\ built:\ Python\ version\ 2\ (2.7.5\ or\ later)\ is\ required. /bin/sh: 1: Syntax error: "(" unexpected ninja: build stopped: subcommand failed. Fix also an identical issue spotted a few lines underneath. Change-Id: I7ce667c182b48c0557bf52b67defc375e67134d6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 9fa5a13bea3d0c23be073ba0bad5cad7cc8162b9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Enable native arm64 builds on macOSMichael Brüning2021-06-151-8/+4
| | | | | | | | | | 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>
* Make qt-configure-module workJoerg Bornemann2021-06-071-11/+18
| | | | | | | | | Check for QT_CONFIGURE_RUNNING and - don't call find_package - define stubs for functions that are incompatible with qt-configure-module Change-Id: I2032302c25e1bcac6939a665cd6f136de8421acf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Skip static buildsMichal Klocek2021-06-041-0/+5
| | | | | | Fixes: QTBUG-94189 Change-Id: Ieb3818410435af979309da7cda50f8ed3fca9023 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Disable cross compilation for linux for the momentMichal Klocek2021-06-011-1/+1
| | | | | | Task-number: QTQAINFRA-4459 Change-Id: I7d84f14340f7a755ce4c2816d3f62f340139b4de Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Do not build for windows arm64Michal Klocek2021-05-281-1/+7
| | | | | | Task-number: QTBUG-94065 Change-Id: I6993e33a2112c3c4bc4596b6d38df6f2fb136afa 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>
* Skip build on mac arm64 for nowMichal Klocek2021-05-221-1/+12
| | | | | Change-Id: Ic41babce600955029f1b3cd630707408136a0f65 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add examples to the cmake buildMichal Klocek2021-05-221-1/+0
| | | | | | | | | | | | | 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 configure.cmake filesMichal Klocek2021-05-121-0/+462
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>