summaryrefslogtreecommitdiffstats
path: root/src/corelib/configure.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Remove winrtOliver Wolff2020-06-061-3/+2
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Generate information about 3rdparty libs in module .pri filesJoerg Bornemann2020-05-191-11/+15
| | | | | | | | | | | | | For modules that are not yet ported to CMake and that use QMAKE_USE += libfoo we need to provide the information about libfoo in the qt_lib_XXX.pri files. Also, we now generate qt_ext_XXX.pri files for bundled 3rdparty libs. Task-number: QTBUG-75666 Change-Id: I9e4b057a197554ecb37c294c0bf09e2a2b3aa053 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Namespace all our IMPORTED targetsJoerg Bornemann2020-04-291-4/+4
| | | | | | | | | | | CMake IMPORTED targets should be namespaced so that CMake knows that the name refers to a target and not a file. Use the existing WrapXXX naming scheme where applicable. Fixes: QTBUG-83773 Change-Id: I5b0b722c811200c56c260c69e76940a625228769 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Regenerate configure.cmake filesAlexandru Croitor2020-04-021-2/+2
| | | | | | | | | Fixes syntax warning for c++ filesystem check. Amends 907652e1ed3c95e3fdb1620cec4d5a1034153398 Change-Id: Ieafee3610b3eea0e6c13df4d78f21ab333f3d3c0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Extend the configure test for C++17 filesystemMartin Storsjö2020-03-301-1/+3
| | | | | | | | | | | | | | If recent versions of libc++ are built with filesystem support disabled, the filesystem header still is installed., The std::filesystem::path() constructor is completely defined inline in that header, making the test pass on such configurations, despite C++17 filesystem not being implemented. Test a call to std::filesystem::copy instead, which requires the actual library implementation to be available as well (on recent libc++). Change-Id: Id997ab75f3299d8431b13cad871f2901f4d9f6ed Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* cmake: Remove APPLE prefix from platform namesTor Arne Vestbø2020-03-161-1/+1
| | | | | | | None of the other platforms have it. Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Remove old 3rdparty mechanism for double conversionAlexandru Croitor2020-03-101-0/+15
| | | | | | Change-Id: I2b20d4d9d95a1f7f59bc506046a1ebc20eb305f7 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Regenerate configure.cmake files to get reportsAlexandru Croitor2020-03-091-0/+49
| | | | | Change-Id: Ifa1646c7e471b3eaba552498ee1dc24f6ab864de Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Allow building bundled 3rd party libraries in qtbaseAlexandru Croitor2020-02-251-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few things are needed to accomplish that: - the python scripts do not ignore certain system_foo features anymore (it is a hardcoded list for now just to be safe) - configurejson2cmake now outputs qt_find_package(WrapSystemFoo) calls for bundled libraries (see below) - the harfbuzz .pro file is modified to accommodate pro2cmake not being able to correctly parse some conditional scopes - the freetype .pro file is modified to make sure linking of the library succeeds without duplicate symbol errors, which qmake doesn't encounter due to magical exclusion of cpp files that are included in other cpp files (presumably for include moc_foo.cpp support) - feature evaluation for Core, Gui, Network now happens in the qtbase/src directory, so that bundled libraries can be conditionally built - for each bundled library there are now two FindWrap scripts: - FindWrapSystemFoo which finds an installed library in the system - FindWrapFoo which either uses the system installed library or the built bundled one depending on a condition - projects that intend to use bundled libraries need to link against WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets (this is handled by pro2cmake). Unfortunately manually added qt_find_package(WrapFoo) calls might still be needed as is the case for WrapFreetype and others. - a new cmake/QtFindWrapHelper.cmake file is added that provides a macro to simplify creation of WrapFoo targets that link against a bundled or system library. The implementation is fairly ugly due to CMake macro constraints, but it was deemed better than copy-pasting a bunch of almost identical code across all FindWrapFoo.cmake files. - a qtzlib header-only module is now created when using bundled zlib, to provide public syncqt created headers for consumers that need them. These are projects that have 'QT_PRIVATE += zlib-private' in their .pro files (e.g. qtimageformats, qtlocation, qt3d, etc.) This is unfortunately needed due to QtNetwork using zlib types in its private C++ API. The change includes support for building the following bundled libraries: - zlib - libpng - libjpeg - Freetype - Harfbuzz-ng - PCRE2 The following 3rd party libraries are still using an old implementation within the CMake build system, and should be migrated to the new one in the near future: - double-conversion - Old harfbuzz The are a few libraries that are not yet ported: - system-sqlite - systemxcb - maybe others Among other things, this change allows building qtbase on Windows without requiring vcpkg. Task-number: QTBUG-82167 Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* Remove QUrl::topLevelDomainTimur Pocheptsov2020-02-201-6/+1
| | | | | | | | | | And move the actual implementation from corelib/io to network/kernel sub-module. Fixes: QTBUG-80308 Change-Id: I554b05bae3552c68e1e1a405c169366ee19120b2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Regenenerate projects where recent changes happenedAlexandru Croitor2020-02-111-0/+22
| | | | | Change-Id: If86e49d73a45b7cfc494fa48bdc6cb1ba503b112 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Post Merge FixesLeander Beernaert2020-01-241-3/+8
| | | | | Change-Id: I1e06c01b76b119c3f23b6e6ecbaae8df719b70ce Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate configure.json files after changesAlexandru Croitor2019-12-031-11/+18
| | | | | | | | | | | | Use all the original non-normalized feature names, and normalize them in CMake land rather than Python. This gives us the necessary original name information for further usage when generating qmake pri and prl files. Change-Id: If9db9028dac6175b8f6971e4b91558d76b8e9296 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Post merge fixesLeander Beernaert2019-11-251-0/+11
| | | | | Change-Id: I78d3c9687f99c0a32da04257e297e88ef0b02581 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate all configure.json filesLeander Beernaert2019-10-211-4/+27
| | | | | Change-Id: Iabd2430adc4877859dc73f4092927a69decf0311 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Re-generate affected cmake files and configure.json after the mergeSimon Hausmann2019-10-171-0/+5
| | | | | | | | | This also removes the workarounds of commit b2662b05dd078c46b82f5f041f51b0b83554113d now that it's fixed "upstream" in the .pro files. Change-Id: Idd5e6273873a700fcda5a6cad2039c4e88b61f6f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate files after dev -> wip/cmake mergeAlexandru Croitor2019-10-141-5/+1
| | | | | | | | | | Note the following bigger things that had to be done: Handle GSS library / feature with a new custom find module. Implement rudimentary support for relocatability (does not currently handle extprefix). Change-Id: Ic6cd27dda7ebca9829f51cb42ea76fff6d1767ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate qtbase after wip/qt6 -> wip/cmake mergeAlexandru Croitor2019-10-141-1/+22
| | | | | | | | | | | | | | | Note that android builds will be broken after this merge and regeneration, because we don't currently handle the minimum required changes that were brought in with the Android multi ABI support that comes from 5.14. This will have to be addressed in a separate change. For now the build on Android will fail while compiling due to incorrect generation of LIB_SUFFIX with QT_ARCH. Change-Id: Ia4a871f4b7ddd0da11caf5f34e10a599a97bb55d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Merge branch 'wip/qt6' into wip/cmakeAlexandru Croitor2019-08-151-1/+1
| | | | Change-Id: I50ac36b8803c296998149e98cc61e38687cdd14b
* CMake: Add WrapPCRE2 packageCristian Adam2019-06-051-2/+2
| | | | | | | | The WrapPCRE2 package handles the PCRE2 packages that have targets, and reuse them. Change-Id: I24b0b51f507703cd8287f845f7e425f62dd2c3d6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-031-3/+7
| | | | | | Take 5. Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
* Improve configure2cmake to find_package only in certain conditionsAlexandru Croitor2019-05-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't make much sense to look for X11 related packages on macOS and Windows by default. Usually they would not be there, and as a result the configuration step would show a long list of scary not found packages, and also eat precious configure time. Change the conversion script to allow putting conditions around generated find_package calls. These conditions can be manually set in the conversion script library mapping, using the emit_if argument, which we do for the X11 and Wayland related packages. They are also computed by checking which features use a given library, and if the feature is protected by a simple emitIf condition like config.linux, the relevant library find_package call will be protected by the same condition. If a developer still wishes to look for all packages, they can define the CACHE variable QT_FIND_ALL_PACKAGES_ALWAYS to ON. The relevant configure.cmake files are regenerated in this patch. Change-Id: I6f918a94f50257ec41d6216305dae9774933389a Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Improve mapping of librariesTobias Hunger2019-05-031-4/+4
| | | | | | | | | | | | | Merge all data related to mapping libraries into one data structure in helper.py. Use that data for everything related to library mapping. This change enables way more features now like e.g. adding find_package calls into generated files. Change-Id: Ibbd2a1063cbeb65277582d434a6a672d62fc170b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: configurejson2cmake: Do not generate useless OPTIONALsTobias Hunger2019-05-031-8/+0
| | | | | | | | | | Do not set properties of packages to type OPTIONAL. That is the default anyway. Update generator script and generated files. Change-Id: I7a4d043b69c93ce8c2929a2e27ac6a07e4e6d8cc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Write find_dependency() calls in Qt Module config filesAlexandru Croitor2019-05-021-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a new function called qt_find_package() which can take an extra option called PROVIDED_TARGETS, which associates targets with the package that defines those targets. This is done by setting the INTERFACE_QT_PACKAGE_NAME and INTERFACE_QT_PACKAGE_VERSION properties on the imported targets. This information allows us to generate appropriate find_dependency() calls in a module's Config file for third party libraries. For example when an application links against QtCore, it should also link against zlib and atomic libraries. In order to do that, the library locations first have to be found by CMake. This is achieved by embedding find_dependency(ZLIB) and find_dependency(Atomic) in Qt5CoreDependencies.cmake which is included by Qt5CoreConfig.cmake. The latter is picked up when an application project contains find_package(Qt5Core), and thus all linking dependencies are resolved. The information 'which package provides which targets' is contained in the python json2cmake conversion script. The generated output of the script contains qt_find_package() calls that represent that information. The Qt5CoreDependencies.cmake file and which which dependencies it contains is generated at the QtPostProcess stop. Note that for non-static Qt builds, we only need to propagate public 3rd party libraries. For static builds, we need all third party libraries. In order for the INTERFACE_QT_PACKAGE_NAME property to be read in any scope, the targets on which the property is set, have to be GLOBAL. Also for applications and other modules to find all required third party libraries, we have to install all our custom Find modules, and make sure they define INTERFACE IMPORTED libraries, and not just IMPORTED libraries. Change-Id: I694d6e32d05b96d5e241df0156fc79d0029426aa Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-161-1/+153
| | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
* Regenerate cmake files from configure.json filesAlexandru Croitor2019-03-181-7/+7
| | | | | | | | | The new files represent the json features more closely. This helps with various build issues as well, like dynamicgl feature not being present before. Change-Id: I433592f48e0550700226a635492a3ce15af743c1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* configurejson2cmake.py: Don't emit a fixme for C++11 configAlbert Astals Cid2019-02-121-2/+1
| | | | | Change-Id: I8408f6126115a0f76b0fed2cc42b54e5c148821d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* configurejson2cmake.py: Support for the two cases that have LIBS +=Albert Astals Cid2019-02-121-8/+6
| | | | | | | | Since there's only two i hardcoded it for the moment instead of trying to parse the line Change-Id: I0da578af64ef9621cbbc78bf6ce15bf8a3f63f1c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: also write FIXME on the configure.cmake for 'use'Albert Astals Cid2019-02-121-1/+2
| | | | | | | Since most of the times it means we need to link with some other stuff Change-Id: I06262d4403225bca7a5e68d47145fefcf6702e5a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Allow passing libraries to qt_config_compile_testAlbert Astals Cid2019-02-111-2/+12
| | | | | | | | Fixes cxx11_future and ipc_posix tests Change-Id: I0f3a7b1a0452724c07198a87c2fc25344e7451eb Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* cmake: glib changed name to glib2Albert Astals Cid2019-02-011-3/+3
| | | | | Change-Id: I4a86bd3b01e1fe307e9802182df943245a7fce4c Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Add support to find LTTng-ustTobias Hunger2018-11-061-1/+3
| | | | | | | CMake comes with a Find module for this, so use it in src/corelib/configure.cmake Change-Id: I8f4abcb32fb10513d67c3c959310eefaf7b56d3d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: Add FindSlog2Tobias Hunger2018-11-061-1/+3
| | | | | | | Add FindSlog2 and use it in src/corelib/configure.cmake. Change-Id: I7e6a696a49df568a41ed1224228ab608db2dbb0e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: Improve handling of the different kinds of iconvTobias Hunger2018-11-061-4/+10
| | | | | | | | | Improve conditions/enable/disable conditions for iconv related features. These are detected a bit different from what qmake does, so adapt to that. Change-Id: I7b3e4baf05dc324507f370d7f651a62f29e42a98 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: Add FindPPS and use it in src/corelib/configure.cmakeTobias Hunger2018-11-061-1/+3
| | | | | | | | Find the PPS library and use the result PPS_FOUND in configure.cmake where needed. Change-Id: I08d3ace421278dc0ae5c3128d4234e6bca906c05 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: Find librtTobias Hunger2018-11-061-1/+3
| | | | | Change-Id: Ibc39ba7a385146cd0428b78e12a793f0ddbfae91 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Rerun configurejson2cmake after rebase on top of newer devTobias Hunger2018-11-011-0/+7
| | | | | Change-Id: I1af79e5c87bb17e9145f817d2488c6d24531a2fc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Begin port of qtbase to CMakeSimon Hausmann2018-11-011-0/+712
Done-by: Alexandru Croitor <alexandru.croitor@qt.io> Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-by: Kevin Funk <kevin.funk@kdab.com> Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Done-by: Simon Hausmann <simon.hausmann@qt.io> Done-by: Tobias Hunger <tobias.hunger@qt.io> Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-by: Volker Krause <volker.krause@kdab.com> Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>