summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Fix static usage requirements for XcbQpaJean-Michaël Celerier2019-06-051-1/+1
| | | | | | | | | | | | | In particular, Qt targets extended with other qt targets (eg. Qt::VulkanSupport or Qt::LinuxAccessibilitySupport) after the first add_qt_module were not taken into account when generating Depends files. Note that this patch updates the minimum required version to CMake 3.15 Change-Id: I747deedd4d59e385876bc1a834ef9bdb6078911b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix build against sysrootsSimon Hausmann2019-05-291-1/+1
| | | | | | | | | | | Toolchain files from sysroots (such as Yocto or Android) typically set the CMAKE_FIND_ROOT_PATH_MODE_PACKAGE to ONLY to ensure that no external packages are accidentally found. Similar to how we discover the Qt tools packages for cross-compiling, we need to temporarily change the mode to BOTH to locate our build internals. Change-Id: Ib4374ee4a974379213218b7ec430637857ed02e7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Use the qt_build_repo() macros for building qtbase as wellAlexandru Croitor2019-05-151-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | To implement this, create a new Qt5BuildInternals package. All child Qt modules like qtsvg should use find_package(Qt5BuildInternals) or find_package(Qt5 COMPONENTS BuildInternals) in the their top level CMakeLists.txt. This will make the qt_build_repo() macros available. For qtbase we slightly cheat, and specify a CMAKE_PREFIX_PATH pointing to the source folder that contains the BuildInternals package. For the other modules we actually use a configured and installed package Config file. This change moves variables that used to be written into the QtCore Config file into the BuildInternals package. This way things that are relevant only for building additional Qt modules does not pollute the QtCore package. Task-number: QTBUG-75580 Change-Id: I5479adff2f7903c9c2862d28c05c7f485ce3e4eb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Update version in cmake to 5.14.0Liang Qi2019-05-021-1/+1
| | | | | | | The dev->wip/cmake merge is done already. Change-Id: Ia6b17ac633cd2bcd1e9f6e96a0a0bf33042ed63b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Export tool config and target files for each relevant moduleAlexandru Croitor2019-05-021-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake will now generate config and target files for each module that provides tools. As a result, namespaced global targets such as Qt5::moc or Qt5::rcc can be made available. Third party projects that require just these tools, and not the Qt modules themselves, should specify CMAKE_PREFIX_PATH pointing to the installed Qt location, and call find_package(Qt5CoreTools), find_package(Qt5GuiTools), etc. It is also possible to call find_package(Qt5Tools REQUIRED Core Widgets) where the last option is a list of modules whose tools should be imported. Note that all the tools are in the Qt5:: namespace and not in the Qt5CoreTools:: or Qt5WidgetsTools:: namespace. This commit also changes the behavior regarding when to build tools while building Qt itself. When cross compiling Qt (checked via CMAKE_CROSSCOMPILING) or when -DQT_FORCE_FIND_TOOLS=TRUE is passed, tools added by add_qt_tool will always be searched for and not built. In this case the user has to specify the CMake variable QT_HOST_PATH pointing to an installed host Qt location. When not cross compiling, tools added by add_qt_tool are built from source. When building leaf modules (like qtsvg) that require some tool that was built in qtbase (like moc), the module project should contain a find_package(Qt5ToolsCore) call and specify an appropriate CMAKE_PREFIX_PATH so that the tool package is found. Note that because HOST_QT_TOOLS_DIRECTORY was replaced by QT_HOST_PATH, the ensure syncqt code was changed to make it work properly with both qtbase and qtsvg. Here's a list of tools and their module associations: qmake, moc, rcc, tracegen, qfloat16-tables, qlalr -> CoreTools qvkgen -> GuiTools uic -> WidgetTools dbus related tools -> DBusTools Task-number: QTBUG-74134 Change-Id: Ie67d1e2f8de46102b48eca008f0b50caf4fbe3ed Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Force feature_summary to fail when a required package is not foundAlexandru Croitor2019-04-081-1/+6
| | | | | | | | | | | | | | | | | | Apparently calling set_package_properties with TYPE REQUIRED and then calling feature_summary with FATAL_ON_MISSING_REQUIRED_PACKAGES and PACKAGES_NOT_FOUND is not enough to make CMake fail when not finding a required package. You have to explicitly set REQUIRED_PACKAGES_NOT_FOUND to force feature_summary to fail when a package is not found. Do this, and also explicitly add the rest of the NOT FOUND cases, to get a slightly clearer overview what kind of packages were not found. Task-number: QTBUG-74133 Change-Id: Id21af13dafafe0a458cff479e8abbc6aa7e6a3f7 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Skip the qmake build when cross-compilingSimon Hausmann2019-02-181-1/+3
| | | | | Change-Id: I24da7eb9587235aa937a984e91a833284b4f28e5 Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* Fix build of neon accelerated drawing helpersSimon Hausmann2019-02-111-1/+1
| | | | | | | | We must instruct cmake that we're interested in providing input files for the assembler directly and the file name needs to be correct, too :) Change-Id: I7cccb6ac66d28261ee71869991b14ac20c63050e Reviewed-by: Liang Qi <liang.qi@qt.io>
* Require cmake 3.14 properSimon Hausmann2019-02-111-3/+1
| | | | | | | It appears that the latest cmake provides 3.14 as a proper version. Change-Id: Ib0f0a1bbdd11e2129f25618b412015a2456aaba1 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* cmake: Add fixme mentioning we need a newer cmakeAlbert Astals Cid2019-01-311-1/+1
| | | | | Change-Id: Ie2227e1c5d8357b979436bd5997b1458bf9efef9 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* cmake: Silence CMP0083 warnings until we can depend on cmake 3.14Albert Astals Cid2019-01-301-0/+2
| | | | | Change-Id: Idbbe325bf088a68f875ab0e7b2eeb30badf864a7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Add "BUILD_EXAMPLES" option to disable examplesTobias Hunger2019-01-171-1/+5
| | | | | | | | | BUILD_EXAMPLES defaults to "ON". Change-Id: I5dfe926d8a23b610b45a5243deeb82483d998b90 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
* CMake: SimplifyTobias Hunger2018-12-141-1/+1
| | | | | | | | | | | * Only import features once * Move Core specific code into its CMakeLists.txt file * More consistently use target names like "Core" to refer to "Qt modules". We tend to require either "Core" or "QtCore" in places, which I find confusing. Change-Id: Id54161bc5468412750cb9eb7eeb15de3812e8a09 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Add option to run cmake build testsTobias Hunger2018-11-221-0/+3
| | | | | | | | Use "cmake -DBUILD_CMAKE_TESTING=ON" to enable running cmake build system tests with ctest. Change-Id: I0a32e2d1771c9bbb0df013d0d955a9b58b1d4b79 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CMake: put linebreaks into module path setupTobias Hunger2018-11-051-1/+5
| | | | | Change-Id: I68a1bbfd9f936a408e304fdae47fb42f72d6db46 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Begin port of qtbase to CMakeSimon Hausmann2018-11-011-0/+43
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>