summaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Make paths in qt-cmake-standalone-test relativeAlexey Edelev2020-11-171-14/+21
| | | | | | | | Make paths in qt-cmake-standalone-test relative to script's PWD. Fixes: QTBUG-88380 Change-Id: I6ab507c31ebed391f4e85bc6fe3f7f747dd97d54 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Enable exceptions by defaultMårten Nordheim2020-11-161-3/+7
| | | | | | | | Without breaking currently generated CMakeLists Fixes: QTBUG-88549 Change-Id: Ibda643e1374d9024bf693c12de8ec0ac46e09b7b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix configure not to pass clang compilers for AndroidAlexandru Croitor2020-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | That breaks configuration with CMake version 3.18.x (but not 3.19 for some reason). Specifically configure ends up passing -DCMAKE_CXX_COMPILER=clang++ which overrides the compiler set by the CMake Android toolchain file, and at the very end of CMake's configuration it complains about You have changed variables that require your cache to be deleted. Configure will be re-run and you may have to reset some variables. The following variables have changed: CMAKE_CXX_COMPILER= clang++ Which suddenly starts another configuration with the modified compilers, ends up detecting host compilers and libraries and basically everything breaks apart. Fix QtProcessConfigureArgs.cmake not to pass the compiler options if the mkspec contains 'android'. Who knows, we might need this for other platforms too at some point. Task-number: QTBUG-88460 Change-Id: Idd57870a7cb1009a4e7802e5b3d5ac735f2dacf6 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Install missing debug info for some executable filesLi Xinwei2020-11-161-0/+3
| | | | | | | | | | | | | | | | | Although many executable files were generated by qt_internal_add_tool(). Some executable files like designer and androiddeployqt were generated by qt_internal_add_app(). Some executable files like windeployqt were generated by qt_internal_add_executable(). For these executable files, their PDB files won't be installed on MSVC platform, and their separate debug info won't be generated and installed on other platforms. To fix this, qt_enable_separate_debug_info() and qt_internal_install_pdb_files() should also be called in qt_internal_add_executable(). Fixes: QTBUG-88268 Change-Id: Id6a3b5842dba325166e3d696701c82ad942bca74 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* update KDE-ECM CMake modules to include fuzzer sanitizerAndreas Buhr2020-11-141-1/+10
| | | | | | | | | | | Updates one 3rdparty CMake file from https://github.com/KDE/extra-cmake-modules to include support for fuzzing. Task-number: QTBUG-88429 Change-Id: I19e7ed3c5602c34ba4b86e6b0df2ea3047c7c9e6 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Install pdb files to proper directories in multi-config buildLi Xinwei2020-11-141-2/+16
| | | | | | | | | | | | | | In multi-config build, for different configs, the pdb files of EXEs should have different installation directories. For example, when CMAKE_CONFIGURATION_TYPES=RelWithDebInfo;Debug, <build_dir>/bin/moc.pdb will be installed to <install_dir>/bin/moc.pdb. <build_dir>/bin/Debug/moc.pdb should be installed to <install_dir>/bin/Debug/moc.pdb, not <install_dir>/bin/moc.pdb. Fixes: QTBUG-88268 Change-Id: Idc7c92ca8d44bb81d990656af2b309306a4f5c6b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: fix running Android testsAssam Boudjelthia2020-11-122-8/+9
| | | | | | | | | | | | Android *.so files need to CXX visibility to default after qt_set_common_target_properties() which was setting it to hidden. Also, pass the correct androidtestrunner arguments for cmake check target Fixes: QTBUG-88228 Change-Id: Ia29cdc9e65153c9669f3ec06f74a46f8fcd8c507 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Remove indirection via Startup target for EntryPointTor Arne Vestbø2020-11-124-21/+3
| | | | | | | | | | | | | The EntryPoint interface target now contains all the logic for what flags and optional static libraries to add when the entrypoint is enabled. The target property QT_NO_ENTRYPOINT can be used to disable the entrypoint. Change-Id: I9b14ff729366cd6307789c969ebd4b2ca19de77d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix Core -> Core dependency in static buildJoerg Bornemann2020-11-121-1/+1
| | | | | | | | | | | | | | | Fix the overly strict regex in qt_internal_create_module_depends_file to allow for - and _ in module names. We had the above mentioned dependency cycle, because the module name Core_qobject was translated to just Core, creating a Core -> Core dependency. Amends da7609e7d0592b76ccb7cfb6c3136267172dc6bf. Fixes: QTBUG-88437 Change-Id: I866f7ce31e9a1b92fe4c0a6450295c2f3c761558 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Add special processing of opengl configure optionAlexey Edelev2020-11-121-0/+5
| | | | | | | | | | Since feature evaluation expects explicit 'no' value for INPUT_opengl to disable either desktop or es2 opengl support, add special processing for -no-opengl option into QtProcessConfigureArgs.cmake Task-number: QTBUG-88142 Change-Id: Ib49123ee3e9f98035f6ec85a182382559f4db478 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix configure arguments handlingAlexey Edelev2020-11-121-1/+1
| | | | | | | | | | All configure arguments should be processed as strings and not be ignored if they satisfy CMake's FALSE criteria (see https://cmake.org/cmake/help/latest/command/if.html) Fixes: QTBUG-88424 Change-Id: I932038ad3c5999bed58957dec51fbf892bd650d7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Do not set PKG_CONFIG_* environment variablesJoerg Bornemann2020-11-121-10/+0
| | | | | | | | | | | | | This reverts commit 9968a211f92c2b4d5bd1fe004f16ec1c5f968dcd. The PKG_CONFIG_* environment variables should be added by the user environment, preferably by the toolchain file. Apparently, the change was added for Android before we turned off pkg-config for Android. It is not needed anymore. Change-Id: Ieeed09ae53a606c85d4937f463286b5b0f76bde9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* MSVC: enable identical COMDAT folding for release buildsYuhang Zhao2020-11-121-1/+1
| | | | | | | | | | | | | | | According to Microsoft's docs, /OPT:ICF is enabled by the linker by default unless /OPT:NOICF or /DEBUG is specified. If we are in RelWithDebInfo mode, /DEBUG is passed to the linker to generate debug symbols, however, it caused the identical COMDAT folding be disabled. We now pass /OPT:ICF to the linker explicitly to prevent this. [1] https://docs.microsoft.com/en-us/cpp/build/reference/opt-optimizations?view=msvc-160 Change-Id: I02099edb81034ace7bb19f1164d57829e3979a5f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Handle exported namespace when computing depsTor Arne Vestbø2020-11-111-2/+2
| | | | | | | We need to handle the possibility of versioned dep (Qt6::Foo). Change-Id: I66797dbc59f00500892958e9c99c4555cddcb980 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Handle genexes when computing dependsTor Arne Vestbø2020-11-111-1/+1
| | | | | | | If not, the resulting dep would end up as 'Foo>', but we need 'Foo'. Change-Id: I246b66eb0ac6b076eea200c4d1ad84bba8ed179c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Build Qt (and client apps using it) with /permissive-Giuseppe D'Angelo2020-11-102-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *Not* using /permissive- exposes Qt and client apps to interesting bugs and/or build failures, (e.g. QTBUG-87225, or 19b5520abfb5f66d4b83c7a18cc72d68673d098a). We demand strict conformance by any other compiler, it's time to demand it from MSVC too. The Windows headers themselves are clean starting from the Windows Fall Creators SDK (10.0.16299.0), and moreover Qt 6 will drop WinRT; therefore, the comment in the mkspecs does not apply any more. Since /permissive- implies /Zc:referenceBinding, drop that option. The other implied options are set on MSVC < 2017, but I leave them in to avoid tinkering with the fragile lists of C/C++ flags. Rename the CMake internal helper function to better describe what it does. Fixes: QTBUG-85633 Fixes: QTBUG-85637 Fixes: QTBUG-85635 Fixes: QTBUG-88244 Change-Id: Ie03fddb61aa066fdc14b7231c22e7108b4a02fbb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Map configure -hostdatadir to INSTALL_MKSPECSDIRJoerg Bornemann2020-11-102-0/+7
| | | | | | | | | | In the qmake-based build, the hostdatadir is the directory where "Data used by qmake" is located. In the CMake build the equivalent is INSTALL_MKSPECSDIR. Create the mapping accordingly. Fixes: QTBUG-88211 Change-Id: I9e3d1af24bc7f41333ef2269fced5ab3fcfa848d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Allow using DESTDIR when installing documentationChristophe Giboudeaux2020-11-101-7/+20
| | | | | | | | | | | | | | Previously, QtDocsHelpers.cmake was invoking CMake to copy files or directories instead of using installation targets. This resulted in DESTDIR being ignored. Now we create installation targets and ask CMake to install them. Change-Id: Idbc79d47a37f9ca865d28543bdbbdde3ba448fa3 Fixes: QTBUG-87382 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move iOS entrypoint logic to entrypoint libraryTor Arne Vestbø2020-11-101-3/+3
| | | | | Change-Id: Ie0fc8368953a59d06a31847ed417bc3c35f29b90 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Implement configure -list-featuresJoerg Bornemann2020-11-102-2/+47
| | | | | | | | | Extend qt_configure_get_padded_string to make the feature list look like qmake's. Fixes: QTBUG-88144 Change-Id: I714f2b2f3537b506365a03b5b6bc3413e9cab167 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Warn when building Qt with a generator other than NinjaAlexandru Croitor2020-11-101-0/+10
| | | | | | | | | | | | For now, we only support building Qt with the Ninja generator (and Ninja Multi-Config). Issue a warning when a different generator is used. Allow opting out of the warning by passing -DQT_SILENCE_CMAKE_GENERATOR_WARNING=ON. Change-Id: I5faa5b0ca5fd42efc090ad2ccf4f896bd77e50ca Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Make Release the main config of a -debug-and-release buildJoerg Bornemann2020-11-101-1/+1
| | | | | | | | In configure we need to set the Release configuration first to make it the main configuration. Change-Id: I5fe744b0dcea009c4d672bf519b38c80c87475dd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix installation errors in multi-config buildJoerg Bornemann2020-11-104-6/+27
| | | | | | | | | | | In multi-config builds (which equals the debug-and-release feature) we exclude tools of the non-main configurations from the default build. But we still create installation rules for them. Mark those as optional to avoid "cmake --install" yielding errors if those tools weren't built. Fixes: QTBUG-85411 Change-Id: Ic2d3897d1a1c28a715d9a024ec8606fff00e0315 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Make zstd config-based lookup quietAlexey Edelev2020-11-091-2/+4
| | | | | | | | | | | | | Make zstd config based lookup quiet and check for version variable as required for ZSTD target. Add IMPORTED_LOCATION by default for pkg-config based search. Expect that select_library_configurations will set correct value for ZSTD_LIBRARY. Fixes: QTBUG-88091 Change-Id: Ia5079154ce4fc4eefbc0931317219b5ca0f3f82f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add handling of PLUGIN_EXTENDS for generic pluginsAlexey Edelev2020-11-091-3/+2
| | | | | | | | | | Modify pro2cmake converter to add extra argument to qt_internal_add_plugin. DEFINE_IF FALSE is added to generic plugins those had "PLUGIN_EXTENDS = - " specified in .pro files. Fixes: QTBUG-87861 Change-Id: I9269df19a32a088f5261f50e7ffff6d29c3d605f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Don't add module pri library entry for header modulesTor Arne Vestbø2020-11-091-1/+7
| | | | | | | | The QT.foo.module entry is used for linkage, so we shouldn't add it for header only modules. Change-Id: Ibb6e7ab08083ccab11d7e060f35c54153e3751c0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Allow module to specify initial dependsTor Arne Vestbø2020-11-091-1/+4
| | | | | Change-Id: I85f39f16f2103dcb42ff467bbc79a0baf6c020e1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix qt-configure-module location in configure's outputJoerg Bornemann2020-11-091-1/+6
| | | | | | | | | For non-cross-builds, qt-configure-module is located in CMAKE_INSTALL_PREFIX/bin, not below the staging prefix. Fixes: QTBUG-88262 Change-Id: Ib6cdd88ece391d5b8ce850b991564e5bed1e475d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Avoid usage of FEATURE_debug_and_release in QtSetup.cmakeJoerg Bornemann2020-11-091-1/+1
| | | | | | | | | | | If the user turns on debug_and_release with the configure script, FEATURE_debug_and_release will not be set, and the debug postfix won't be set correctly. Directly use FEATURE_debug_and_release's condition instead. Change-Id: Ica4af3caa25f2e6712eca4659818aac2c8b95256 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix configure -developer-buildJoerg Bornemann2020-11-091-0/+6
| | | | | | | | | | | | | | | Configure now translates -developer-build to INPUT_developer_build without setting FEATURE_developer_build. The install prefix determination code in QtSetup.cmake happens much earlier than the feature evaluation. As the developer_build feature is merely a switch that's supposed to be flipped by the user, we can just translate the INPUT_developer_build value to FEATURE_developer_build in QtSetup.cmake. Fixes: QTBUG-88318 Change-Id: I57918232359e2e367e41b779d3f4737731dd76e5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Add function to get a target property, with empty string as fallbackTor Arne Vestbø2020-11-081-0/+9
| | | | | Change-Id: Ic39fefb91e9ca0f36c815c969ff1072767a9ab16 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Locate zstd using CONFIGAlexey Edelev2020-11-081-21/+51
| | | | | | | | | | | Trying to locate zstd package configuration prior to use pkg-config. Define explicit IMPORTED_LOCATION_DEBUG and IMPORTED_LOCATION_RELEASE in case of pkg-config usage. Fixes: QTBUG-88091 Change-Id: I3cb86a66fad4e7b78b3d2fcff061508fc25e25a7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add PCRE2 library selection depend on debug version availabilityAlexey Edelev2020-11-081-1/+7
| | | | | | | | | Use select_library_configurations to select applicable libraries set for PCRE2. Fixes: QTBUG-88092 Change-Id: I11e669a0142d53a3c344c86bd1d8eb797df4ba97 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Allow using a custom target for qt_internal_add_docsAlexandru Croitor2020-11-071-1/+1
| | | | | | | | | | | Some repos (like qtimageformats) might not have Qt modules, but they still need a target to pass to qt_internal_add_docs(). Allow passing custom targets to qt_internal_add_docs() without trying to generate bogus include paths. Change-Id: I12191e5b16c082e62e40c96d0eb4d6c0256e7ea4 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Private module pri files should have internal_moduleAlexandru Croitor2020-11-071-0/+4
| | | | | | Change-Id: I35b4111e4044ae6283eb8175173453db9001c71b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Disconnect docs installation targets from generation targetsJoerg Bornemann2020-11-062-7/+0
| | | | | | | | | | | | | | | | | "ninja install_docs" should not run the "docs" target, because with the usual workflow ninja docs ninja install_docs the documentation would be built twice. That of course means that "ninja install_docs" will fail if "ninja docs" wasn't run before. Analogous for html_docs, qch_docs, the repository-level and module-level documentation targets. Change-Id: I8ad83602dd393b5afc79a19ab3d395987c889d0d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix top-level documentation install targetsJoerg Bornemann2020-11-062-0/+6
| | | | | | | | | | | | | | | | | | | | | The following targets did not do any actual installation: install_docs, install_html_docs, install_qch_docs, plus their repository-level counterparts. Add the following dependencies: install_html_docs --> install_html_docs_<repo> --> install_html_docs_<module> Analogous for qch. The install_docs target already triggers install_html_docs and install_qch_docs. Analogous for install_docs_<repo>. Fixes: QTBUG-86738 Change-Id: I3468e000e050e2787a859e61d40161f5459cb351 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add version information to Qt plugin DLLsJoerg Bornemann2020-11-061-0/+4
| | | | | | | | | | Tools and library DLLs already have version information embedded. Add the missing _qt_internal_generate_win32_rc_file call for plugins. Fixes: QTBUG-87747 Change-Id: I619948f4066ce229d41e8b93f125751e1d28e26c Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Rework INPUT_ variables handlingAlexey Edelev2020-11-061-10/+9
| | | | | | | | | | | | INPUT_ variables enable FEATURE_ variable only in case if valid "true"-like value is assigned from command line. Amends dc43061e9abb15bc07eb236f5344c79d27590812 Fixes: QTBUG-87755 Task-number: QTBUG-88142 Change-Id: I65e85c7548981fdec94366b531f6df6396be71b7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix usage of cache variables in qt.toolchain.cmakeJoerg Bornemann2020-11-052-0/+39
| | | | | | | | | | | | | | | | | | We have some cache variables that are used in our qt.toolchain.cmake toolchain file, for example QT_CHAINLOAD_TOOLCHAIN_FILE. When CMake runs a configure test with try_compile, our toolchain file is included again, but only a restricted set of variables is available. Add the variables that are used in our internal toolchain file to CMAKE_TRY_COMPILE_PLATFORM_VARIABLES. This makes them visible for try_compile calls operating on source files. Also pass the variables via the environment to support try_compile calls that operate on whole projects. Fixes: QTBUG-87873 Change-Id: Iebca9e23686bec5072194b15482e1782b9367a0e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: don't add the same parameter twiceYuhang Zhao2020-11-041-9/+1
| | | | | Change-Id: Ic5001f296b56f1181f5e37718e090f931eca8b50 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add quotes to cmake_args in guess_compiler_from_mkspec functionDavid Skoland2020-11-041-1/+1
| | | | | | | | These were omitted in the original change, which cause cmake builds to fail configuring Change-Id: I37996099aaa0d912ce06b1f06c175cc5cf159e33 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* cmake: Always add -Wno-ignored-attributes for clang targeting windowsMartin Storsjö2020-11-041-6/+7
| | | | | | | | | | | This matches how it is in the qmake mkspec, silencing a lot of warnings - but contrary to when building with qmake, it's only applied when building Qt itself. For external projects built with cmake, the Qt headers are included with -isystem, which silences any warnings from those headers. Change-Id: I1a498d3c2715cb73e647668cb7226ceeffb7ff0b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake Build: Enable separate debug info for all target typesCristian Adam2020-11-045-7/+32
| | | | | | | | | | | | | Now all shared libraries and executables will get .debug files on the platforms that support FEATURE_separate_debug_info With the directory property _qt_skip_separate_debug_info certain targets can retain the debug symbols in the binary e.g. lupdate with MinGW 8.1.0 will cause objcopy / strip to fail. Fixes: QTBUG-87015 Change-Id: I03b106e68ef0a42011d1ba641e6f686b2e7b7fb4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Set a warning flag based on the target arch, not build hostMartin Storsjö2020-11-031-1/+1
| | | | | Change-Id: I0b524d52286210b7782dd710467fbc3a742d0c08 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add handling of user-defined INPUT_foo cache variablesAlexey Edelev2020-11-032-3/+11
| | | | | | | | | | | | "configure" script translates feature-related parameters to INPUT_ variables instead of FEATURE_. Both INPUT_ and FEATURE_ variables passed to cmake script are equivalent. FEATURE_ has higher priority in case if both are defined. Fixes: QTBUG-87755 Change-Id: If697a0d62ab839877a3196ea74e631582a570dda Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix Windows top-level configure.batJoerg Bornemann2020-11-031-1/+7
| | | | | | | | | We must write config.opt in the same directory we're reading it from. We must not write the -top-level argument to config.opt. This amends commit 2a29426e39. Change-Id: I96da9094579fec29c290411677d6b538878399f4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Bump the minimum required CMake version to build Qt to 3.18Alexandru Croitor2020-11-035-0/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new function that returns the minimum CMake version required to build Qt. Pass that value to cmake_minimum_required() when building qtbase and its standalone tests. The minimum supported CMake version is read from qtbase/.cmake.conf and its value should be updated when the need arises. It's the main source of truth for all repos. Provide a way to lower the minimum CMake version at configure time by passing a value via QT_FORCE_MIN_CMAKE_VERSION. This is not an officially supported way of building Qt. If the specified version is lower than Qt's supported minimum, show a warning. Nevertheless the option is useful for testing how Qt builds with a different minimum CMake version due to different policies being enabled by default. Issue warnings for CMake versions that are higher than the minimum version but are known to cause issues when building Qt. A counterpart change is needed in qt5 to ensure the minimum CMake version is set at the proper time for top-level builds. Ideally we would use the same 'check the CMake minimum version` code in all our repositories, but that will cause lots of duplication because we can't really find_package() the code and doing something like include(../qtbase/foo.cmake) hardcodes assumptions about repo locations. So for now we don't bump the minimum version in child repo cmake_minimum_required calls (qtsvg, qtdeclarative, etc). Instead we record both the minimum supported version and the computed minimum version (in case a different version was forced) in QtBuildInternalsExtra.cmake. Then we require qtbase's computed min version in qt_build_repo_begin(). This won't set policies as cmake_minimum_required would, but at least it propagates what minimum CMake version should be used for child repos. We might still have to bump the versions in child repos at some point. Task-number: QTBUG-88086 Change-Id: Ida1c0d5d3e0fbb15d2aee9b68abab7a1648774b9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Allow adding linker flags to qmake module prisTor Arne Vestbø2020-11-031-1/+4
| | | | | | | | | | | | | The flags go before the library in the final linker line, as opposed to the dependencies declared in LIBS. This allows us to declare the flags for the entrypoint in the project file of the entrypoint, instead of in a standalone prf. Change-Id: I35c054fe9fdaa6add7cd0e8ba3f7304f975ff80f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Allow adding extra content to module priTor Arne Vestbø2020-11-021-1/+4
| | | | | | | On the qmake-side we had exports, but they were quoted. Change-Id: I95af4b927079691cab6403fec850f345ba181a00 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>