summaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Fix build of Core module without regularexpression feature"Alexey Edelev2021-03-041-3/+3
|\
| * Complete the renaming of qt_add_tool to qt_internal_add_toolJoerg Bornemann2021-03-041-3/+3
| | | | | | | | | | | | | | | | | | | | Fix the name in the function's doc comment and error messages. Pick-to: 6.1 Change-Id: I918db802a0dbb0508f65d227f7c896d2ad0beeae Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* | Merge "Remove win32_system_libs feature from src/corelib/configure.json"Joerg Bornemann2021-03-043-9/+49
|\ \
| * | Move syncqt.pl to libexecJoerg Bornemann2021-03-041-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To not disturb the qmake build we kept syncqt.pl in <src>/bin but installed it to libexec. This is not necessary anymore. This also removes the need for having syncqt.pl in both, bin and libexec in the build dir of qtbase. Pick-to: 6.1 Fixes: QTBUG-91076 Change-Id: I44b014ea41e3f00c420e02fd5c76f11169340b8c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * | Make toolchain inspection more robustJoerg Bornemann2021-03-042-4/+48
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtAutoDetect.cmake did read the (possibly detected) toolchain file and looked for the string "The Android Open Source Project" to deduce that we want to build for Android. This has been done, because we're autodetecting the platform before the first project comment, i.e. before the toolchain file is loaded. This magic string detection is a bit fragile, and we need a similar approach for WebAssembly. A more robust approach would be to fetch the value of CMAKE_SYSTEM_NAME from the toolchain file without actually loading it. Now, we run a CMake script that includes the toolchain file and prints variables were interested in. The calling code reads these variables and stores them in prefixed variables in the current scope. Change-Id: Ide9ea3054e1453d17129523e1ec86ecaed55af2a Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* / headersclean: Compile with -std=c++latest, -Zc:__cplusplus on MSVCKai Köhne2021-03-041-1/+1
|/ | | | | | | | | | | c++latest does check that our headers also work with upcoming C++20 support in MSVC. It also implicitly sets -permissive-, which checks for stricter standards compliance. Pick-to: 6.1 Task-number: QTBUG-91117 Change-Id: Iaf1547191969213d570a1b2f59888ad04a7977ab Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Improve support for QT_ADDITIONAL_PACKAGES_PREFIX_PATHKai Köhne2021-03-033-4/+12
| | | | | | | | | | | | | | | | | | | Allow to set QT_ADDITIONAL_PACKAGES_PREFIX_PATH as both an env variable and CMake cache variable. Also normalize path and list separators, so that they can be used similar to CMAKE_PREFIX_PATH. The environment variable is intended to be set by the conan virtualenv generator, so that e.g. find_package(Qt6 COMPONENTS NetworkAuth REQUIRED) also works if NetworkAuth is not installed into the Qt prefix. Pick-to: 6.1 Fixes: QTBUG-91142 Change-Id: Ia9f9b9fa2b1b051d33073629139640d0f4c7a843 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Craig Scott <craig.scott@qt.io>
* Generate information about user-facing applications in build dirJoerg Bornemann2021-03-024-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When packaging different Qt versions for Linux distributions (or any distribution with a common bin dir), Qt tools cannot be installed to /usr/bin, because the executable names of the different Qt versions clash. To solve this conflict, our recommendation is to install Qt's tools to /usr/lib/qt6/bin and to create versioned symlinks to user-facing tools in /usr/bin. User-facing tools are tools that are supposed to be started manually by the user. They are marked in Qt's build system. Distro package maintainers can now configure with -DCMAKE_INSTALL_PREFIX=/usr -DINSTALL_BINDIR=/usr/lib/qt6/bin -DINSTALL_PUBLICBINDIR=/usr/bin and will find a file called user_facing_tool_links.txt in the build directory after the cmake run. Nothing will be installed to INSTALL_PUBLICBINDIR. Each line of user_facing_tool_links.txt consists of the installation path of a user-facing application followed by a space and the versioned link name in INSTALL_PUBLICBINDIR. Example content: /usr/lib/qt6/bin/qmake /usr/bin/qmake6 To actually create the versioned symlinks, the content of this file can be fed to ln like this: xargs ln -s < build-dir/user_facing_tool_links.txt Or the package maintainer may decide to do something completely different as suits their needs. This patch adds the USER_FACING argument to qt_internal_add_tool to mark tools as user-facing. In addition, every Qt created by qt_internal_add_app is treated as user-facing. The only tool this patch marks as user-facing in qtbase is qmake. Pick-to: 6.1 Fixes: QTBUG-89170 Change-Id: I52673b1c8d40f40f56a74203065553115e2c4de5 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Make qt_get_module_for_plugin() internal and do what its name saysCraig Scott2021-03-021-12/+7
| | | | | | | | | | | | | | | | | | Contrary to its name, this command was also setting a target property. Since it was only called in one place and that caller can just as easily set the property instead, rename the command to make clear its internal nature and refactor it so that the caller is responsible for setting that property instead. Also make it an error rather than just a warning if the command is used for a target that doesn't belong to any module. Since this is now unambiguously an internal command, we should always expect the target to belong to a module. Pick-to: 6.1 Change-Id: I929a652ddd482653868fc9df887f38f4bc7f35d9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Simplify prefix-related functionality of qmakeAlexey Edelev2021-03-011-9/+0
| | | | | | | | | | | | | Since the QT_CONFIGURE_HOSTBINDIR_TO_HOSTPREFIX_PATH and QT_CONFIGURE_HOSTBINDIR_TO_EXTPREFIX_PATH definitions keep the same value in modern CMake build, no need to have special handling in cases where these values are used in qmake. Also it will be useful to specify the relative path to the prefix directory from the directories different of 'bin' when use QMakeLibraryInfo. Task-number: QTBUG-75870 Change-Id: I5a777001eb334dcf05e22853a514d4257352d59b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use Core library for qmake instead of the Bootstrap libraryAlexey Edelev2021-02-254-24/+9
| | | | | | | | | | | | | | | | | | | Move the qmake-specific logic of the QLibraryInfo class to qmake internals. 'qconfig.cpp.in' now stores information about the library info entries to keep them consistent between qmake and the Core library. qmake requires specific features enabled in the Core library, so building qmake will be skipped if the features are not enabled. All flags directly related to the qmake have been removed from Core lib. Remove all bootstrap related sections from qmake CMakeLists.txt Task-number: QTBUG-89369 Change-Id: I26de157d3bfd4a5526699296e9d46e1c180b89ae Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove INTERNAL argument from qt_internal_add_linker_version_scriptJoerg Bornemann2021-02-251-34/+30
| | | | | | | | | The code branch for the INTERNAL argument did nothing, and we never call qt_internal_add_linker_version_script with INTERNAL. Change-Id: Ie369b4dac29cd1a977433ebfd662c198a3e1d0f2 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Prevent qt_remove_args() from accessing out-of-range list indexCraig Scott2021-02-241-0/+4
| | | | | | Pick-to: 6.1 Change-Id: Ie9c5f0551722c7d3fb11879b209c11ce3d7ccd6d Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* CMake: Reformat shared keyword listsCraig Scott2021-02-241-12/+63
| | | | | | | | | | | | Putting each keyword on its own line makes it much easier to read and improves maintainability. It is friendlier to source control when keywords need to be added or removed. This commit introduces no functional change. Pick-to: 6.1 Change-Id: I79efd039e5afa5f11f1d859405d6487ad6b3beb2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Avoid cyclic dependency between plugin and module *Config.cmake filesCraig Scott2021-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In static per-repo builds, we have a mix of targets provided by packages and targets provided by the main build. For the builds that create the packages, we must avoid adding a dependency for the main module library target on its associated plugin targets or else the package config files end up with a cyclic dependency that cannot be resolved when something tries to consume them. This only happens for static builds because we have been attaching a linking relationship to the main module library that isn't really a true dependency, we attached it only for convenience of things linking to that module library. To preserve that convenience linking without breaking the config packages, we use the QT_NO_CREATE_TARGETS condition to prevent CMake seeing that relationship when generating the *Config.cmake files. Creating these relationships will be delayed until the plugin's *Config.cmake file is loaded, at which point it will add itself to the main module library's imported target INTERFACE (this was already done before, we just now rely solely on that). Task-number: QTBUG-90819 Pick-to: 6.1 Change-Id: Id725742182bcda64841be84fe1650bafb9151bb1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* cmake: Don't give plugins PUBLIC usage requirementsCraig Scott2021-02-241-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | The pro2cmake.py conversion script faithfully reproduced the .pro files for the plugins, which specified the libraries as public. But in CMake, the implications of this are that public usage requirements should then be propagated to consumers. We don't expect any consumers, since a plugin is created as a MODULE library in CMake, so for Windows we don't even have an import library to link with. The only exception to this is for static builds where plugins are created as STATIC libraries instead, but only in certain controlled situations do we then link to plugins. Even then, usage requirements are not expected to propagate to the consumers, so these relationships should always be specified as private. This change warns on any PUBLIC usage requirements specified for a plugin. This check is disabled by default to avoid spamming CI builds for repos that haven't been fixed yet. The check can be enabled by a CMake cache option, which is intended for developers to use locally when fixing this issue in other repos (all plugins in qtbase should not trigger this warning as a result of changes in this commit). Task-number: QTBUG-90819 Pick-to: 6.1 Change-Id: I09f2c8da77db1193ad3370f85d367dfc6ab7b9a6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Move build tools to libexec instead of the bin dirJoerg Bornemann2021-02-231-1/+1
| | | | | | | | | | | | | | [ChangeLog][Build System] Tools that are called by the build system and are unlikely to be called by the user are now installed to the libexec directory. This is a step towards easier co-installability of different Qt versions. Pick-to: 6.1 Task-number: QTBUG-88791 Change-Id: Id19575b5ba27795f7715e4ea6a09391b26dd4942 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Coin: remove workarounds to allow running Android testsAssam Boudjelthia2021-02-181-2/+0
| | | | | | | | | | | | | We had two workarounds: * script that adds Gui to tests * create a symbolic link for the qt install dir to fake_prefix which androiddelployqt was expecting them to be under Both issues are fixed, thus removing the workarounds. Pick-to: 6.1 6.0 Change-Id: Ic022bece15afe92c693d573893d260b13b4227ed Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* CMake: handle Android features dependencies for modulesAssam Boudjelthia2021-02-181-0/+19
| | | | | | | | | | | QMake used to allow retrieving the Android features list for a modules. The dependencies are written to *-android-dependencies.xml files and are read by androiddeployqt. This option was missed at some point along the way of writing CMake port for Qt 6. Pick-to: 6.1 6.0 Change-Id: Ic0b82f024567e640968f97aeff2db1888f2b53a5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qmake: Introduce QT_HOST_LIBEXECS propertyJoerg Bornemann2021-02-181-0/+1
| | | | | | | | | This will be used to access host tools that are installed in ${prefix}/libexec instead of ${prefix}/bin. Pick-to: 6.1 Change-Id: I36c4b5736330f8229d267a117c65d55cd5e12758 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Do not rewrite boolean INPUTs if they have a corresponding featureAlexey Edelev2021-02-181-12/+0
| | | | | | | | | | | | | | | | | | | Initial replacement of boolean INPUT_ variables to the FEATURE_ variables was wrongly changed to updating of the INPUT_ variable value to ON/OFF value. This causes potential issues when INPUT_ variable has explicit check for 'yes' or 'no'. The feature evaluation step enables FEATURE_ variables in case if the corresponding INPUT_ variable contains a positive CMake value. So there is no need to process boolean INPUTs at the argument processing step. Also no need to keep the special opengl case, since it will be processed correctly. Fixes: QTBUG-91158 Pick-to: 6.0 Pick-to: 6.1 Change-Id: I96bb7903a904ae3cf788d7ef7d4e0c019046eb95 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Document more arguments of qt_internal_add_toolJoerg Bornemann2021-02-151-0/+6
| | | | | | | Pick-to: 6.1 Change-Id: Ia89922bb7d8ce327ea864889f5e2132427c58be6 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Prepare installation of tools to libexecJoerg Bornemann2021-02-151-6/+19
| | | | | | | | | | | | Add the INSTALL_DIR argument to qt_internal_add_tool to allow installation of tools in other locations than INSTALL_BINDIR. Pick-to: 6.1 Task-number: QTBUG-88791 Change-Id: I88ede81a4c13c82f6d209156d3801ce130f8fc10 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Run headers_clean check with C++20 (gcc, clang)Kai Köhne2021-02-151-2/+2
| | | | | | | | | | | | | | | | The headers are already somewhat tested with C++17 in the regular build. So let's try in the headers_clean check with C++20 instead. Using C++20 with MSVC 19.28 doesn't work yet though: corelib/tools/qalgorithms.h(247): error C2039: 'popcount': is not a member of 'std' corelib/tools/qhashfunctions.h(311): note: see declaration of 'std' corelib/tools/qalgorithms.h(247): error C3861: 'popcount': identifier not found ... Task-number: QTQAINFRA-4242 Change-Id: I1b48bcb9656fe1587fe03d3a17e3484c693aa295 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* cmake: Do not hard-code test argumentsTor Arne Vestbø2021-02-151-5/+0
| | | | | | | | | Tests should follow their default output of txt as when run directly, and any output configuration should be handled by the CI system. Change-Id: Id0d72318df5edad1c58ac637e827d6043884e829 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Toni Saario <toni.saario@qt.io>
* Android: set minimum recommended android SDK to 29Assam Boudjelthia2021-02-131-1/+1
| | | | | | | | | | | comply with the api version used by default with androiddeployqt and in docs. Google play also requires api 29 as minimum. Task-number: QTBUG-90943 Pick-to: 6.1 6.0 Change-Id: I05e2a90b4d7f2120b0198e3fb7b8b1b2398eba93 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* CMake: add Qt::Gui dependency by default for Android testsAssam Boudjelthia2021-02-111-1/+5
| | | | | | | | | | | | | | | | | Normal Android apps require Qt::Gui dependency and since tests don't need to handle any special cases for an app without Qt::Gui, let's add it by default. This also will allow us to remove some workarounds done on CI side to run tests for Android. Fixes: QTBUG-90870 Pick-to: 6.0 6.1 Change-Id: I845650c17a1b73e4c4977043f863ec44e50f06c3 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* configure: Don't guess the compiler if the user already chose oneJoerg Bornemann2021-02-111-4/+41
| | | | | | | | | | | | We must not guess the compiler from the -platform argument if one of the following holds: - the CXX/CC environment variables are set - the CMAKE_CXX_COMPILER/CMAKE_C_COMPILER variables are passed Pick-to: 6.1 Fixes: QTBUG-90914 Change-Id: Iff7a0e7b8857f77333f1705f118d7952af5234ba Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: setup windows tools path only when building on WindowsSamuli Piippo2021-02-111-1/+1
| | | | | | | | | | | Fix cross-compilation on Linux host. Task-number: QTBUG-91052 Pick-to: 6.1 Change-Id: I48c970f0e6af71e3eda3818557e764f60d3836ad Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix FindWrapOpenSSL.cmake if OpenSSL::Crypto is UNKNOWN_LIBRARYJoerg Bornemann2021-02-111-1/+1
| | | | | | | | | | | The attempt to call target_link_libraries on OpenSSL::Crypto failed when this target was added as UNKNOWN library by FindOpenSSL.cmake. Instead, set the INTERFACE_LINK_LIBRARIES property directly. Pick-to: 6.1 6.0 Fixes: QTBUG-90925 Change-Id: Idbc1379c89480225fc7a8d417416ed20404a1122 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* More helpful error message when merging qt features in CMakeAndreas Buhr2021-02-101-1/+1
| | | | | | | | | | When a feature is set in qtbase and is later set to another value, an error occurs and an error message is given. This patch changes the error message to contain both the preexisting and the new value Change-Id: Ifa9fc1f06bfde40e8fd5dfdf30165d4393abbd28 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Fix completely wrong init_class and jar_bundle_native valuesAlex Blasche2021-02-101-2/+2
| | | | | | | | | | This prevented androiddeployqt from properly deploying libraries which specify init class via the ":" delimiter. Pick-to: 6.0 6.1 Change-Id: Ib9cfa7edc864d7d540577df22284ceb9714a2511 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
* Update name of c++2a to c++20Kai Köhne2021-02-102-2/+2
| | | | | | | | | | Keep the c++2a feature, but make it an alias for compatibility purposes. Pick-to: 6.1 Change-Id: I6f153109be84659806f1b7a57a88a187875166d8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* CMake: Rename QML2 imports to QML importsUlf Hermann2021-02-081-1/+1
| | | | | | | | The 2 is meaningless. Task-number: QTBUG-85064 Change-Id: Ic91872804be266d50224fb272b4f4836573f4bf7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* configure: Fix handling of -translationdir argumentJoerg Bornemann2021-02-081-1/+2
| | | | | | | | | | This is supposed to be mapped to INSTALL_TRANSLATIONSDIR, not INSTALL_TRANSLATIONDIR (without the s). Pick-to: 6.0 6.1 Fixes: QTBUG-90946 Change-Id: Icec93ffc0dc80d9ac7cf6cf1b13824bc2a1e795f Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* CMake/QtAutoDetect: fix failure with multiline toolchain filePeter Seiderer2021-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unquoted 'string(FIND ${toolchain_file_content} ...)' call fails for multiline content of the variable toolchain_file_content, so add quotes around, fixes: [...] CMake Error at cmake/QtAutoDetect.cmake:42 (string): string sub-command FIND requires 3 or 4 parameters. Call Stack (most recent call first): cmake/QtAutoDetect.cmake:311 (qt_auto_detect_android) CMakeLists.txt:19 (include) [...] -- Configuring incomplete, errors occurred! in case the given toolchain file starts with multiple lines in the first 80 characters, e.g. in the case of buildroot: # # Automatically generated file; DO NOT EDIT. # CMake toolchain file for Buildroot # [...] Task-number: QTBUG-90980 Pick-to: 6.0 6.1 Change-Id: I8e038e08d83016e8253f2e83b2efb8f06034c6cd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Allow benchmarks with --force-debug-infoAllan Sandfeld Jensen2021-02-051-1/+1
| | | | | | | | Developer builds with RelWithDebInfo should also make benchmarks, it is how we get good traces. Change-Id: I009d40580d5d784f78bd18ebf21887ce3c1fa97d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add framework paths when generating moc manuallyAlexey Edelev2021-02-051-0/+20
| | | | | | | | | | | In apple systems it's necessary to pass the framework paths to the moc generator to resolve required header files. We need to collect framework paths for all INCLUDE_DIRECTORY_TARGETS and add them to the command line of the moc generator. Task-number: QTBUG-84906 Change-Id: I9e6356e7e0a5f2493823ec764a48b0b8f1c8c10d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix HAVE_openssl config test when using static OpenSSLLi Xinwei2021-01-281-0/+12
| | | | | | | | | | | | | | | | | When using static OpenSSL, HAVE_openssl test will fail, because of unresolved external symbols. These symbols are from Ws2_32.lib and Crypt32.lib, which CMake does not link by default. In qmake build system, we can use OPENSSL_LIBS variable to specify these system libraries. But there is no similar variable in CMake build system. Accordingly, we should let OpenSSL::Crypto target link these libraries. Upstream issue: https://gitlab.kitware.com/cmake/cmake/-/issues/19263 Pick-to: 6.0 Change-Id: I5f27790b251d0a0f71aaf2aed2b933aeb3326f1f Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Clear non-relevant CMake compiler flagsAlexey Edelev2021-01-275-28/+104
| | | | | | | | | | | | | | | | Add internal function to cleanup compiler flags out of the CMAKE_xxx_FLAGS_xxx variables. Use introduced interface to clear the '/EHsc' flag for the MSVC compiler family. This adjusts the CMake behavior to the qmake one. Change the 'EXCEPTIONS' option handling in helper functions. Add ability to add enabling and disabling exception flags. Previously it was only possible to add disabling exception flags. Fixes: QTBUG-89952 Change-Id: I60d47660a97ae9b5a1d1f4107d352c9e97890144 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix output files of the *_header_check targetsJoerg Bornemann2021-01-271-1/+3
| | | | | | | | | | | | | | | | | Header files of a Qt module are usually found in subdirectories. Avoid creating object file paths like "header_foo/bar.h.o". When building with conan, the "header_foo" subdirectory was not created for whatever reason. Now, we make sure we have clean object file paths, e.g. "header_check/foo/bar.h.o", and we create the directory upfront before invoking the compiler. Fixes: QTBUG-90529 Change-Id: Ifa5d6b97e07fc4e249c58cda5128439d60b14f5f Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit 54980200c79b466a276a4d3054390e4b3162e9ed) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QT_TOOL_PATH_SETUP_COMMANDJuha Vuolle2021-01-271-1/+1
| | | | | | | | | | | | | | Commit 18fc9e1bf821130f0cfe45dc7d5c05b70458e7c0 introduced a Windows-only QT_TOOL_PATH_SETUP_COMMAND to make it possible to call the tool of a module while building the module itself. The "set PATH=..." command in QT_TOOL_PATH_SETUP_COMMAND was flawed, because it contained escaped double quotes which made the set command ineffective. Fix this by removing the escaping of the double quotes. This was uncovered when porting qtscxml to CMake. Change-Id: I5909aa841e7895d6d0feb4037a935b805ccfdc99 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* ibase: Fix the compilation and include it again so it can be detectedAndy Shaw2021-01-261-0/+51
| | | | | Change-Id: I38721155f090173862da8beab8cb04b2e015dcff Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Fix invalid Qt prefix version when looking for HostInfo moduleAlexey Edelev2021-01-263-12/+12
| | | | | | | | | | | | | | | | | | | In QtSetup.cmake the PROJECT_VERSION_MAJOR variable was used to identify prefix of 'Qt<version>HostInfoConfig.cmake'. Qt<version>HostInfo is not found, if project version differs from qtbase version. Move the 'INSTALL_CMAKE_NAMESPACE' and 'QT_CMAKE_EXPORT_NAMESPACE' variables to 'QtBuildInternalsConfig.cmake'. In this case variables will be exposed for a wider list of internal routines. Use the 'INSTALL_CMAKE_NAMESPACE' variable as prefix to find Qt<version>HostInfo module. Fixes: QTBUG-90345 Change-Id: Ic595d1c5beb74f34e69b58e18590a3afc2f346f7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add upstream version of FindPostgreSQL.cmakeAlexey Edelev2021-01-261-0/+317
| | | | | | | | | | | | Add CMake upstream(3.20.0) version of FindPostgreSQL.cmake, to avoid server-related headers lookup. Avoid using the Qt version of the PostgreSQL module, if it's older than the CMake's one. Fixes: QTBUG-89639 Change-Id: I71a0c3508000901969933aea8a08d1ad431db711 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Ensure consistent flags for ASM language and MODULE targetsCraig Scott2021-01-261-2/+2
| | | | | | | | | | | | | | | | | | | By not including ASM in the languages for which compiler flags are adjusted, we can end up with inconsistent optimization and debug settings between different languages. Make sure they are treated the same. Similarly, linker flags for MODULE target types should also have their debugging and incremental linking flags adjusted, just like EXE and SHARED targets. When building with MSVC, MODULE targets were having the relevant flags stripped, but not then replaced with the desired ones, leaving them empty in typical scenarios. This would primarily affect plugins, which are built as MODULE rather than SHARED libraries. Fixes: QTBUG-90237 Change-Id: I648ea74be1654d24cbecc592ce0ca4b59b2ae839 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Update start of cmake/README.mdKai Köhne2021-01-251-18/+18
| | | | | | | | | | | | | | Make the document reflect the current status of the port. Also link to https://doc.qt.io/qt-6/build-sources.html and https://wiki.qt.io/Building_Qt_6_from_Git as official sources on how to build Qt. This document should IMO rather concentrate on documenting the build system internals. Pick-to: 6.0 Change-Id: If62cb966b41b7452edb5b63725756916b66affac Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Bump copyright year to 2021Kai Köhne2021-01-251-1/+1
| | | | | | Change-Id: I18a9c2de391ca51655148b2e3cc9abdfbb8ddbcf Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix QMAKE_PRL_LIBS entries on Windows for modules from other reposJoerg Bornemann2021-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | When building a repository != qtbase, like qtactiveqt, QMAKE_PRL_LIBS contained entries like Qt6Core and Qt6Widgets, meaning the linker line would contain exactly these arguments. When building an activeqt example with qmake, the link then failed with "LNK1181: cannot open input file 'Qt6Widgets.obj'". The correct entry would have been $$[QT_INSTALL_LIBS]/Qt6Widgets.obj. Fix this by determining the full path to the import library in the first step of the prl generation. This enables QtFinishPrlFile.cmake to recognize Qt6Widgets as Qt module and generate the right QMAKE_PRL_LIBS entry. Pick-to: 6.0 Fixes: QTBUG-90520 Change-Id: Id0d9178da0e0dfc3ea4fadbbe8f5900d792ffc84 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Tune compilation flags to reduce libraries sizeAlexey Edelev2021-01-222-1/+15
| | | | | | | | | | | | Add '_WINDLL' definition for the MSVC compilers family. Check the 'FEATURE_optimize_size' value before replacing compiler flags in the qt_internal_add_optimize_full_flags function. This is required, because Qt::Core and Qt::Gui modules lost their ability to shrink, when selecting the appropriate build type or features. Fixes: QTBUG-89952 Change-Id: I982c25ea84e4793b4006ead0ee516b3f3eb2a054 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>