Commit Graph

11 Commits

Author SHA1 Message Date
Alexandru Croitor
b26a52ec48 Update readme to mention how to set feature flags
Change-Id: If63d37af4711c4332129d65b934269c33f041ea4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-02 15:49:39 +00:00
Alexandru Croitor
42d3b21c92 Export tool config and target files for each relevant module
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>
2019-05-02 07:30:30 +00:00
Alexandru Croitor
58316e03a2 Update readme with some useful info
Update required dependencies.
Add section on how to build vcpkg on macOS.
Fix some typos.
Lower required CMake version.
Inform how to bypass annoying ninja reconfiguration issue.

Change-Id: Ia35bd4329c2cbb9857157cdc33b098f5adb04a35
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-01 19:06:12 +00:00
Alexandru Croitor
ea7d13de0d Update README to mention setting the vcpkg toolchain
Change-Id: Icac2ba956246901e02bb6aa257f81cccf56560e8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-03-11 16:54:10 +00:00
Liang Qi
997c869280 cmake: fix the order of parameters for homebrew
Change-Id: I7b597a8d6bc81eafb21e5368a29700638c351bdf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-03-07 09:42:46 +00:00
Alexandru Croitor
e3c2d74506 Update README to specify the minimum version of CMake needed
Change-Id: I10e594859129bddfa56f078389b2272a0072fda0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-03-07 09:34:04 +00:00
Simon Hausmann
b2f03791c1 Provide some basic instructions for cross-compiling and using CCache
Change-Id: I8bb90746d0cef2ea61a5494ef358713d732dcfce
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2019-02-19 08:45:19 +00:00
Liang Qi
73a3a96c7b cmake: update README.md
Added info for using homebrew on macOS.

Change-Id: Ie425793d3de1e72a9342f6c2aaf67a4f85592f3a
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2019-02-12 14:05:11 +00:00
Liang Qi
3552323049 CMake: update README.md
Because AUTOMOC/AUTOUIC/AUTORCC got merged into master.

Change-Id: I0ddfd4443a9892fae1dca54d75b97af4c69ad7ef
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-16 09:05:11 +00:00
Tobias Hunger
e57a94cbd8 CMake: Use AUTOMOC/AUTOUIC/AUTORCC
Change-Id: I0235ca4f227623e5937348b4b010637921dbf154
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-14 14:04:59 +00:00
Simon Hausmann
e9c45bbddd Begin port of qtbase to CMake
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>
2018-11-01 11:48:46 +00:00