summaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* Adaptations for Chromium 100Allan Sandfeld Jensen2022-08-041-1/+0
| | | | | | Pick-to: 6.4 Change-Id: I217c87657f544a2e868de7291353ff1143e20902 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix typoAllan Sandfeld Jensen2022-07-141-1/+1
| | | | | | Pick-to: 6.4 6.3 Change-Id: If92ff1afdaee5096bc3ce8e53332542b8c4375b6 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Add license headers to cmake filesLucie Gérard2022-07-078-0/+24
| | | | | | | | | | | | 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: I118bd63694cfe2c9a413af4a38828a31727f8e86 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix unsupported @file notation on macos archiverMichal Klocek2022-06-071-7/+26
| | | | | | | | | | | Create intermediate object file and use it as imported object library. Fixes: QTBUG-103579 Change-Id: I2ff7d57509ab1f071876de3b6fdc5ed9874c4697 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 88a91f8b30df1b95cf9adebacb13a8c0fc3f06c9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add workaround for unstable gn on macOS in ciMichal Klocek2022-05-032-0/+5
| | | | | | | | | | | | | | | | | | | | | | | In ci 'gn' can crash making it hard to integrate, if there is high load crashes occur more frequently sometimes even blocking integrations for few days. Limit number of worker threads for gn as this improves situation however increases time for generating ninja files from 2s to 7s. Note this will not prevent crashes however significantly reduces the issue (when running in loop from 1 per ~10min to 1 per ~3days) Compilation with address or thread sanitizer does not lead to meaningful traces. Moreover running gn with sanitizer creates deadlocks for unknown reason every few runs. Current assumptions is that macos vms are unstable as crashes also occur for sscache calls (compiler) and python calls. Pick-to: 6.3 6.2 Change-Id: I1c488796eb0547eedd20101606f18ed55718e9c2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Check for stdlib_libcpp feature as it might not existMichal Klocek2022-05-011-3/+7
| | | | | | | | Fixes undefined feature when compiling against 6.2. Pick-to: 6.3 Change-Id: I186d0a0905bfb7d03cff07c2dd6316172efebc04 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Support cross-compilation on macOSMichal Klocek2022-04-301-15/+17
| | | | | | | | | | | | | | | | | | | | | | So far we only supported a cross-compiling with universal builds, however qmake also supports 'regular' cross compilation (by setting '-device-option'). This is semi-supported with qt-cmake as we need to provide additional configure defines like: * CMAKE_OSX_ARCHITECTURES=arm64 * CMAKE_SYSTEM_NAME=Darwin * CMAKE_OSX_DEPLOYMENT_TARGET=10.14 It might seem to be a far fetched issue, however in case of webengine doing the cross compilation for only one architecture allows to save compile times when testing only arm64 builds. Note we do not need to create gn toolchains for that case, however unlike universal builds it requires host qt build for tools. Pick-to: 6.3 6.2 Change-Id: Ica8470fdd4cad4866c1470e0403ffd019eaf39a6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add a dependency on Gn.cmakeAlexandru Croitor2022-04-201-2/+5
| | | | | | | | Previously if Gn.cmake was touched, GN was not reran. Pick-to: 6.2 6.3 Change-Id: I39a070319c5af2a78a8f4e75f2f56ed87cdcb7da Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* CMake: Don't show gn output as it runs, show it after it finishedAlexandru Croitor2022-04-201-1/+0
| | | | | | | | | | | | | | | | | | Using USES_TERMINAL causes ninja to print the stdout of running GN as it comes in, rather than once GN has finished running. This causes extremely confusing logs in the CI when the GN run fails. The output becomes interleaved with execution of other parallel commands and the Ninja 'FAILED:' message is nowhere near the actual failure GN failure message. Remove USES_TERMINAL so that the GN failure message appears immediately after ninja's "FAILED:" message. Recursive ninja output is not affected. Pick-to: 6.2 6.3 Change-Id: Ibbfe5527cf291d9295ae19d988ee1fa83224b38b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix build with libc++Qt Submodule Update Bot2022-04-071-0/+3
| | | | | | | | | | | | Fix build with libc++ on linux by adding missing use_libcxx parameter. Check if re2 and poppler can be used as they use std::string in their api. Add compiler test to check that. Pick-to: 6.3 6.2 Change-Id: I74bf79b8443ad470621c1a2e0c9dc768d4cca1f1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Pass the python executable to gnDimitrios Apostolou2022-03-232-1/+1
| | | | | | | | | | | | | This way the python scripts configured by gn_configure will use the same python version detected by the initial configure_submodule. This is useful when configuring separately and under different environment than the build itself, and the different python executables possibly used in the two phases cause issues, like modules not found. Pick-to: 6.3 6.2 Change-Id: Iab7cc48c2bb4f8c7fb4af7965c1183388a53527b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add static builds for qtpdfMichal Klocek2022-03-092-20/+44
| | | | | | | | | | | | | | | | | | Add 3rdparty installed headers so static builds can use bundled qt libs. Fix static gn and archiver/librarian setup. Updates 3rdparty: * 5d88de975 Fix static build with qt3rdparty libs Task-number: QTBUG-87154 Task-number: QTBUG-88614 Pick-to: 6.3 6.2 Change-Id: Iad7682da92b558b500140f415acc0bc9c9a1c22e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add timeout for gn callMichal Klocek2022-02-051-1/+2
| | | | | | | | | We get sometimes GN_FAILED on mac, unfortunately it is not clear what had failed, therefore log cmake error and add timeout. Pick-to: 6.3 6.2 Change-Id: I69beaa971de4a5848d73613783db94940be91e68 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add QtPdf iOS buildsMichal Klocek2022-02-041-18/+109
| | | | | | | | | | | | | | | | | | | | | | QtPDf iOS builds must support fat libs builds. Compared to 5.15 however this is done differently. Before we tweaked gn to compile multi arch with 'Xarch' parameter. This had few downsides as we could not determine which arch/cpu compiles given file as compilation was opaque to gn. The current approach is to follow mac universal builds, compile builds separately for each architecture and lipo the outcome. However, this introduces some issues as ios builds are static builds and creating lipo archive will gather object files, which should end up in final QtPdf lib instead. Therefore create multi arch object file instead of archive and use this one. Note the compiler now uses arch triple for Pdfium as Chromium does, however qt files still use 'arch' and '*-version-min' combination. Task-number: QTBUG-88614 Pick-to: 6.3 6.2 Change-Id: I7775c8b4d1554df497eb61fa6187f12c00b9032d Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Introduce gn complete static lib target for qtpdfMichal Klocek2022-02-041-56/+63
| | | | | | | | | | | | | | | | | | | | | | With 6.x we have gn-cmake integration which allows now in case of static builds to switch gn target output to static_library with 'complete static' option instead of shared_library. This way we can avoid installing dependencies in form of internal static Chromium archives as it was done in 5.15 in case of static builds. Unfortunately 'complete static' option can not be used with QtWebEngineCore build as it will exceed 4Gb static archive limitation on Windows, however it will work fine with QtPdf. Note the qtbase 3rdparty static libs have to be still installed in case of qt static build, this patch only eliminates need for Chromium specific ones. Task-number: QTBUG-88614 Pick-to: 6.3 6.2 Change-Id: I6fc4ce48c79a1631b013d0b29c190c62280f7304 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Fix multi config generator and add checks for configs,archsMichal Klocek2022-01-121-1/+7
| | | | | | | | | | | | | Fix typo config -> configs. Add checks for configs and archs, otherwise we silently do not set right dependencies and continue the build. This can end up in weird looking errors. Task-number: QTBUG-99511 Pick-to: 6.3 6.2 6.2.3 Change-Id: Ief727033e7b3ac32ab9f42bd96babd9be97f63a6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix moc path in case of top level cross buildMichal Klocek2022-01-131-1/+5
| | | | | | | Pick-to: 6.3 6.2 6.2.3 Fixes: QTBUG-99511 Change-Id: I8b9550c8a7e331e319fc7784224571beef0410b1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add missing BUILD.gn template dependencyMichal Klocek2022-01-061-0/+1
| | | | | | Pick-to: 6.3 6.2 Change-Id: Ic075eaff01c6536ce9d6a12bab7ee0cd8d5764bd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix Windows SDK paths passed to GNAllan Sandfeld Jensen2021-12-211-2/+2
| | | | | | | | GN doesn't use them currently, but I will need them to build ANGLE. Pick-to: 6.3 Change-Id: Ide4d9b93d822abbfff9af4dba1e2f4e6a5cd4cde Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Search PYTHON3_PATH for Python3Allan Sandfeld Jensen2021-12-071-2/+4
| | | | | Change-Id: If9de5a87ff7c398a198a31fd4fd20858e82bec7e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Lower requirement to Python 3.6Allan Sandfeld Jensen2021-12-071-1/+1
| | | | | | | This is the version available on RHEL, and appears to work. Change-Id: I150138cc64b5a796acaeed838a8ec685d4a38c86 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations for Chromium 94Allan Sandfeld Jensen2021-12-022-7/+12
| | | | | Change-Id: I9fb8998a3a7762b0aea70993ca231f0bbf4f7761 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix setup for 'no-prefix' buildsMichal Klocek2021-10-281-1/+11
| | | | | | | | | | | | | | | | | | | QT_SUPERBUILD is never cached and user can run only qtbase as super build and compile any other module as separate module build, moreover this can be also 'no prefix' build. Fix missing checks to support that case and clean up install of resources. For mac framework builds copy bundle to right place in case of 'no-prefix' builds. Fixes: QTBUG-94604 Task-number: QTBUG-96375 Pick-to: 6.2 Change-Id: I4ab7d4fed2c2be93f2a048a510419849361883ba Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add matrix buildsMichal Klocek2021-10-071-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since coin does not support doing matrix projects, add primitive way to automate features builds. Add self build launcher in form of external projects to do few builds one after the other which test some of our features. These are just compilation tests and could also run in coin as scheduled build. Usage: /path/to/qt-cmake-private /path/to/webenginesources -DMATRIX_BUILD=ON Created currently builds: * webengine_extensions-OFF * webengine_printing_and_pdf-OFF * webengine_proprietary_codecs-ON * webengine_spellchecker-OFF * webengine_webrtc-OFF * qtwebengine_build-OFF Pick-to: 6.2 Change-Id: Ie1bbc2cf9b01cb2e5089832d8f1cd6171e31b6fe Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix gn moc path pointing to debug moc for super buildMichal Klocek2021-09-281-1/+6
| | | | | | | | | | | | | | | | | | | | In 53e99bd we used genex to get moc path, this works well, but not for mulitconifg build where genex will output path to debug moc in case of superbuild. To fix issues like that cmake 3.20 introduces $<OUTPUT_CONFIG:...> and $<COMMAND_CONFIG:...> generator-expressions, however it will not help much since they do not work with file(GENERATE), moreover minimal current version is 3.19 Use target property to query moc location or recreate path in case of superbuild. Fixes: QTBUG-96375 Pick-to: 6.2 Change-Id: Ief0fc32d57a36191694102ed010314b5d3395334 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix extract_cflag cmake function to not add extra semicolonPeter Varga2021-09-271-0/+1
| | | | | | | | | | LIST(APPEND cflags ...) separates appended elements with a semicolon. This may break parsing cflags and can result invalid args.gn. Remove semicolons from cflags before parsing it. Pick-to: 6.2 Change-Id: I3898bcad2051276d44953ae72d87cf4f91516012 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix use_lld_linker on WindowsAllan Sandfeld Jensen2021-09-241-0/+9
| | | | | | | | | We need to set the cmake base path, when not controlling the toolchain like on Linux. Pick-to: 6.2 Change-Id: I0e2f1ea76d9c52bb9bf867daa8fa2feceff3707e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix jumbo configurationAllan Sandfeld Jensen2021-09-171-1/+1
| | | | | | | | | The check was reverted putting more memory pressure on low levels, and less on greater ones. Pick-to: 6.2 Change-Id: I1d0afeb0b96ff2d4ccd6249e7dd7312375c2fad4 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Fix rsp workaround for super buildMichal Klocek2021-09-091-3/+8
| | | | | | | | | | | | | Since 9f4914248 we have poor man workaround for broken rsp files on windows with cmake. It requires copy of rsp files to directory where the linker call takes place. Adjust the output directory for super build. Pick-to: 6.2 6.2.0 Fixes: QTBUG-96266 Change-Id: Ib09add2d6069782ba25a820e950759932eefc457 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix runGn of qtpdf target for developer build with clangKirill Burtsev2021-09-091-5/+5
| | | | | | | | | | | | | | | Resolves an error on gn_config_cxx.cmake include: CMake Error at src/pdf/RelWithDebInfo/x86_64/gn_config_cxx.cmake:4: Parse error. Function missing ending ")". End of file reached. Lists for config vars may contain values, like -Wno-error=#warning for GN_CXX_COMPILE_OPTIONS, which cause parsing errors and should be quoted. Pick-to: 6.2 6.2.0 Change-Id: I983f5b23c9013d55f728ffe4354f6abbb0db1911 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Support more module flags for 'configure' scriptKirill Burtsev2021-09-091-30/+40
| | | | | | | | | | | | Support flags passed to main 'configure' and separate 'qt-configure-module' scripts with flags like '-no-build-qtpdf', '-webengine-full-debug-info', '-no-webengine-jumbo-build', etc. Fixes: QTBUG-95717 Pick-to: 6.2 6.2.0 Change-Id: Ia12602e9a9b31f4f2256f983f6c1e3fbe50cb9e3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Extend cflags also for mcpuMichal Klocek2021-09-061-0/+6
| | | | | | | | | Updates Chromium with: * f8a944bbe5f Add support for mcpu Pick-to: 6.2 Change-Id: I3f9d31f3ec99badd62d82fca911bee22dde5985f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Use generator expression to get moc pathMichal Klocek2021-08-311-1/+2
| | | | | | | | | | | | | | | | | | 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. Pick-to: 6.2 Task-number: QTBUG-95590 Change-Id: Ief3dca96f65e198e9693293316b1a90007c56355 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add workaround for not working linking with bfd linkerMichal Klocek2021-08-291-0/+21
| | | | | | | | | | | | | | | | | 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 Pick-to: 6.2 Change-Id: Ib9d0c4ced988d4692746e51f3abbe63ff5085836 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Rewrite gn-cmake integrationMichal Klocek2021-08-293-127/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Pick-to: 6.2 Change-Id: I5e7a34287ee59d904103fe310fc7c6a36a8dfbc9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add 'amazing' windows linker workaround for rsp filesMichal Klocek2021-08-291-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Pick-to: 6.2 Change-Id: I8e96ebf3a9ac7c7d751db6682ce37f38880be793 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Use rsp files directly from gnMichal Klocek2021-08-291-72/+71
| | | | | | | | | | | | | | | | | | 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 Pick-to: 6.2 Change-Id: I83282ba68fa171cada7236d0587be27122315dec Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add QtPdf to cmake buildMichal Klocek2021-08-171-33/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Pick-to: 6.2 Task-number: QTBUG-95353 Change-Id: I4dd9f3934bdd478fb6d2fa686074a24d91f09953 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Refactor gn targetMichal Klocek2021-08-171-130/+147
| | | | | | | | | | | | | | | | | | | | 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 Pick-to: 6.2 Change-Id: Id4a6c61b87fe76832232035fddf212b57051d0ec Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add support for macOS universal buildsAllan Sandfeld Jensen2021-07-221-10/+117
| | | | | | Pick-to: 6.2 Change-Id: I416036a925167204cf5121108922911bce854352 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Improve toolchain generationAllan Sandfeld Jensen2021-07-221-25/+63
| | | | | | | | | Set is_clang and calculate v8-host arch for other hosts than x64. Pick-to: 6.2 Change-Id: I5622839840141ed60328c8bd736e4cada3e0ecee Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* White-space fixes in Functions.cmakeAllan Sandfeld Jensen2021-07-211-97/+97
| | | | | | Pick-to: 6.2 Change-Id: I124b4d6c30debe46f9929576620afb1b3a73837e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Refactor cmake buildMichal Klocek2021-07-201-1/+275
| | | | | | | | | | Add macros to share common cmake code blocks with QtPdf. Reconsider later to do proper scoping and change those to functions if make sense. Pick-to: 6.2 Change-Id: I500acdba1415feab373a012dcf9a9ddedf33cfac Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add arm optimization flags to cmake buildMichal Klocek2021-07-161-0/+55
| | | | | | Change-Id: Ibab4630fd226f46f58d08c603436dc2c378212ec (cherry picked from commit b1a6adf731828b1f68f51480eeb21dd9e7d3ba1e) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add cross compilation support to cmake buildsMichal Klocek2021-07-164-6/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Task-number: QTBUG-91760 Change-Id: Ic2bea12229acc71fbd36a848e9ed4fed7e14b485 (cherry picked from commit 3a962d8a2d3b70639a195fe5fd442f6c653bbe8f) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix embarrassing typoMichal Klocek2021-06-301-1/+1
| | | | | | | | | | | During testing topLevel build vs module build and moving patches between two repositories typo occurred. Fix incompetence. This is fixup for 82769967d3. Pick-to: 6.2 Task-number: QTBUG-94343 Change-Id: I0f708288c312c4f1f3fb1ae30ca6cee957718b1f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add implicit dependencies in case of topLevel buildMichal Klocek2021-06-291-0/+12
| | | | | | Pick-to: 6.2 Change-Id: Ic7a4096d06b05a62a01565d6e7aceac12dc73def Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix issues with missing headers for topLevel buildsMichal Klocek2021-06-291-1/+1
| | | | | | | | | | | | | | Sync script is run by topLevel build during first configure phase. Move sync.profile to module root dir, and run sync script twice during the topLevel builds. This will work since sync script will look up in parent directory for sync.profile for libs external build. Fixes: QTBUG-94343 Fixes: QTBUG-94709 Task-number: QTBUG-94702 Pick-to: 6.2 Change-Id: Icb80d9248ee4611317ab0fba9aa988f8e5ee8073 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* CMake: Ensure libs project is reconfigured when the root project isAlexandru Croitor2021-06-141-0/+20
| | | | | | | | | To ensure that correct CMake and qmake support files are used when building examples. Pick-to: 6.2 Change-Id: Ic52ee7f7153877071ab3883fd436ad888f90680d Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add spellchecker support and qwebengine_covert_dict to cmakeMichal Klocek2021-06-141-0/+34
| | | | | | | | | Add spellchecker dictionary conversion tool. Change scope of gn object imported variables to function scope. Pick-to: 6.2 Change-Id: Ice579a89e20b80034b675e7f767a774100478472 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>