This makes it possible to use the binaries out of the box. This is
particularly relevant for program binaries that link against QtCore
dynamically, when trying to use these binaries during cross-compilation.
Change-Id: I7dee93194be3fff5c6e3bbb9e202e4cf5e19b6d0
Reviewed-by: Volker Krause <volker.krause@kdab.com>
The syncqt generated headers are optional, i.e. their source may not
exist -- so for now make their installation optional (as it seems to
have been the case with qmake).
Change-Id: Ieaeb3d13a1d8ff1f158b5b1c918750fec48d3bef
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Enables the use of e.g. QT_NO_DEBUG in compiler flags, -fPIC, passing on of
QT_NAMESPACE, etc. pp.
Dropping a lot of custom code which handled adding imported targets for
the command-line tools (this is all being handled by CMake already).
It needs to be investigated if we need to resurrect
Qt5GuiConfigExtras.cmake.in in one way or the other.
Change-Id: I4fa141b68fddaad4f33e628c59d5d0b3a7b3a096
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
For now create targets a la "Qt5::Core" to stay compatible with the
current Qt5 naming scheme. The name is controllable via a CMake option.
Change-Id: If43c058221949b1900c2093f39ccc9d0f38028f1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Introduce a new cached variable INSTALL_CMAKE_NAMESPACE for defining the
prefix used for CMake config files (c.f. "${PREFIX}Core/${PREFIX}CoreConfig.cmake")
Also make sure to `find_dependency(...)` the required packages inside
the individual CMake config files. I.e. in Qt5WidgetsConfig.cmake,
search for Qt5Core, etc. pp..
Change-Id: Idc027925fe9d5323091c4853803ad5ce44b1afc6
Reviewed-by: Jean-Michaël Celerier <jean-michael.celerier@kdab.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Allows to install headers such as QtCore/qtconfig.h,
QtGui/qvulkanfunctions.h, etc.
Change-Id: I93f384cdc8bbee07fab316d7e232aae1d209f33e
Reviewed-by: Jean-Michaël Celerier <jean-michael.celerier@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This makes testing for Qt with namespace builds easier in extend_target.
Change-Id: I58ab985a2ed39859fb65d35f8f69065fed2a5c9b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Enable a flag so that cmake documents which extend_target calls it
acts upon and which ones are skipped.
Change-Id: I1e2d4da47b93d6b5d7b7ec25b7bc6341f38b3dca
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Convert QMAKE_USE, QMAKE_CXX_FLAGS and QMAKE_LFLAGS into CMake.
Change-Id: I53a5b91664b6ab71892d4381c00f8d744d7d7abd
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Since the code wants pinger_interface.h as include
name and the qt_create_qdbusxml2cpp_command function was
using the filename as source for the next filename i introduced
a new option DBUS_ADAPTOR_BASENAME/DBUS_INTERFACE_BASENAME to set the
name of the resulting file
Change-Id: I582d578b68275e4530e91a88631ae43fd1ae06fd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This is less self-contained than what we have, but significantly speeds
up cmake configure/generate runs.
This patch also warns when a feature is already defined.
Change-Id: I8cab63e208ba98756b47d362a39b462f5ec55e20
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This simplifies the handling of features a bit as it removes the special
code to store two sets of features in Qt::Core.
Change-Id: I536d41cfc76a02af054e3cfbad6bda50b1e9e49a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* 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>
... and fix the fallout of this change. It results in more targets being
passed overall (instead of a strange mix of targets and module names),
so this is a good thing(TM).
Change-Id: I1c4326b80e2c6675356587879ec8471ef7249a50
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
For Qt6 we want to have Qt6::foo and Qt::foo. Enable that consistently.
Change-Id: I3cf05c4171b13029bf508d307945e8be4687e86b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Do not try to push features up into the parent scope if none were added.
This avoids a lot of iterations over all defined variables.
Change-Id: Idb9a4c86643c0ca773584a05b3a0590cfab7514d
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Add a simple test for moc-file handling and fix the implementation
to make the test pass.
Change-Id: I34e8d65a5e01a6f557d3a3d8cb262fd147ad78e4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Add a test for QRC file handling in cmake and fix the qrc file handling
to handle qrc files in subfolders properly.
Change-Id: Iff4224e59e7ee1badacce5fc00dbf68aef69bffe
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Add a test for uic handling and make it pass.
Change-Id: I7e11f9f1fba0e40c748e3590a0d0cbb72c9ebc28
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Simplify qt_make_output_file and add a simple test for it.
Change-Id: I87694291cd877545ade5d9c42d1424d7b3b7b567
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
extend_target does not import public and private features.
For example:
Qt::CorePrivate matches as ('CorePrivate'), but it should be ('Core', 'Private')
Change-Id: I99144d42b7e0a8f7c4501d3e0eaf04b270c6b4d6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Make sure the features of Qt libraries are available when linking to that
library via the add_qt_* functions.
This was broken for any library that did not end with "Privat" or
"Private".
Change-Id: Iff0ad441b601e0d131b0e30f2069110806410297
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Simplify the scope handling of features by providing a function that
just pushes all QT_FEATURES into the parent scope. Use it.
Change-Id: Ic6552fe495394d73fcec6becf6852745ec2d6d59
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>