The QT_OPENGL_ES* macros are leftovers from an earlier,
ad hoc configuration system, which has since been
replaced by QT_CONFIG. To clean things up in Qt 6,
we use the new way instead.
Task-number: QTBUG-83467
Change-Id: I578dc7695bff9d5ee303b22e44f60fee22fe0c28
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
qt5_use_modules has been deprecated in 2013 (commit d9ea4bb144)
and removed for the first time in 2018, but then brought back - see
discussion in https://lists.qt-project.org/pipermail/development/2018-June/032837.html .
Anyhow, I think we can finally put it to a rest in Qt 6.
Change-Id: I770f7e93406ad68535d1d90e4a3bacfb920e2d5a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit adds transitive dependencies to the plugins, so that a
sane set of default plugins get auto-imported when linking against a
module. It also provides a new function, qt5_import_plugins(), which
allows you to override the set of plugins that get imported. The decision
of whether or not to import a specific plugin is based on several custom
target properties and a very clever generator expression.
Note that this change only imports plugins on static Qt builds. It
does nothing on shared Qt builds, as the shared libraries already have
their own plugin import mechanism.
[ChangeLog][CMake] Added ability to auto-import non-qml plugins on
CMake builds
Task-number: QTBUG-38913
Task-number: QTBUG-76562
Change-Id: I2d6c8908b521cf6ba1ebbbc33a87cb7ddd9935cf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
qt5_add_big_resources is only available if using CMake 3.9 and later.
This amends cdccd0222b.
Task-number: QTBUG-55680
Task-number: QTBUG-75806
Change-Id: Ibba7af6ee7edfb226368937d543b7ec5cc93eb16
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Add properties enabled_features and disabled_features the respective
library targets.
This makes it possible to query the enabled classes in dependent libraries
(for example, Qt for Python).
Add a test verifying whether the Open GL configuration is reflected
correctly in the feature properties to the existing test_opengl_lib
autotest.
Change-Id: I645c947073dbb36da3be81de6bc62ee0ba1e73d6
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Problem:
CMake Error in CMakeLists.txt:
A logical block opening on the line
.../qtbase/tests/auto/cmake/CMakeLists.txt:149 (if)
is not closed.
Broken by change 02ed1b36da
Change-Id: I6c04721edbccaa9fcdb53af92d33dfa87eeaebb8
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
It appears that in the 5 years since we deprecated this function, people
have not stopped using it. The removal of qt5_use_modules() caused lots of
troubles in packages still using it when they were compiled against Qt 5.11.0.
Instead, let's revive this function and keep it for the Qt5 life time.
See discussion on qt-development mailing list:
http://lists.qt-project.org/pipermail/development/2018-June/032837.html
Change-Id: Ic263e3bb6706268cb9ea38a0711665f166a3aa9e
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This removes the following functions from Qt5CoreMacros:
- qt5_use_modules(...)
Task-number: QTBUG-63519
Change-Id: I59769060a3a93686bf319b558c0ede55755fdb70
Reviewed-by: David Faure <david.faure@kdab.com>
Make sure we don't run into warnings for CMake 3.10
Task-number: QTBUG-63442
Change-Id: Ida004705646f0c32fb4bf6006036d80b1f279fd7
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Sebastian Holtermann <sebholt@xwmw.org>
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Make it depend on the corresponding Private target of each
dependency. This way, user code can write
find_package(Qt5Gui REQUIRED)
add_executable(hello hello.cpp)
target_link_libraries(hello Qt5::GuiPrivate)
and get the private include directories for both Qt5Core and Qt5Gui.
Don't create the Private target if any of the private include
directories do not exist. This way, if user code uses one of the
targets, CMake will issue an error if the private include directories do
not exist. Unfortunately the error is somewhat cryptic (eg, 'the
"Qt5::CorePrivate" was not found'), but this is still an improvement
over an error at compile time.
This is an improvement on the situation described in QTBUG-37417 using
Modern CMake features.
Change-Id: I034f8216c3ec64d1a3309682456a713cac9bf854
Reviewed-by: Kai Pastor <dg0yt@darc.de>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
This change disables tests which require QtGui.
Change-Id: Ib647afd086f54536054cb4c0cde5696d762ee8c4
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
The Qt CI does not have ninja, but the autotest can be used for manual
regression finding.
cd qtbase/tests/auto/cmake
qmake
make check
cd build
cmake . -DHAVE_NINJA=ON
ctest -R FINDTESTDATA
Change-Id: Ic3f3748f6ab04e37fa5287c59486e5cd46dcabb4
Reviewed-by: Stephen Kelly <steveire@gmail.com>
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)
Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
CMake newer than 2.8.12 automatically adds the
appropriate flag, but CI still runs 2.8.11.
Change-Id: Ie61375f2feb54a92c9d8f0ed6ad5227a67343bc5
Reviewed-by: Stephen Kelly <ske@ableton.com>
This is needed as of commit v5.6.0-beta1~483 (Add an automatic use of
the ELF-versioned QtCore symbol, 2015-10-20). Even if a translation
unit only contains
#include <QtCore/QString>
int main(int,char**)
{
return 0;
}
it must link to QtCore which provides the qt_version_tag symbol.
Change-Id: I827c0a7403320e7e5b384d8608face20fcecdaea
Reviewed-by: Stephen Kelly <ske@ableton.com>
Don't try to run test_interface when Qt is configured without QtWidgets.
Change-Id: If6c376c250215c1d639b06881d16c0141091f288
Reviewed-by: Stephen Kelly <ske@ableton.com>
If a parameter contains quotes the check for "-binary" fails.
Change-Id: I27148b590d85291a93f1992dfd277fb857bec6e2
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Change-Id: I643049a865b0a8936e132e12f7845d5527f4f808
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Optional parameter DESTINATION to set target rcc file
Example:
qt5_add_binary_resources(GenerateFixture "fixture.qrc")
Task-number: QTBUG-41728
Change-Id: I9dc2fe8e7d5e9ad3873b89f75ab84a2a1b9d1d29
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Outdated header.LGPL removed (use header.LGPL21 instead)
Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing
combination. New header.LGPL-COMM taken in the use file which were
using old header.LGPL3 (src/plugins/platforms/android/extract.cpp)
Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license
combination
Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe
Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
The interface macro needs to be in the Qt namespace, otherwise the
template specialization in Q_DECLARE_INTERFACE fails.
Task-number: QTBUG-41959
Change-Id: I818da5ba8460219d73c0d248ee410ac92f7498f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Change-Id: I1711f99f9e46f1d195684e3c3a714b00618dca2e
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Forward-port of 9ce60ff509c4ff27fe861fc5b2080f50897a68c4 (Qt4Macros:
Allow specifying a TARGET in invokations of macros., 2013-02-26)
from cmake.git.
This causes the INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS to be
used from the specified target when running moc.
Change-Id: I868a35ade3c6b059e64d226291cf2046709d86d4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This is new in CMake 2.8.12 and replaces the old properties
matching IMPORTED_INTERFACE_LINK_LIBRARIES_<CONFIG>.
Change-Id: I5d4c454972f2535f6792e95718c73d80c56ac24c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Some packagers don't want to install the private headers.
Check the existence of private headers only if the 'Private' component
is specified when finding the package.
Task-number: QTBUG-32466
Change-Id: I1fdbfb25e8ce485cd051564b937f766b2733741a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Change-Id: Ida382a80dba882bbeb920756adc0c16321efe37e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
QPrinter is not implemented on android, so the test fails to
link there.
Change-Id: I10ca0179323362a9c9f74325332043c968d67d3c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
There may be multiple libraries specified in the mkspec, such as
EGL and Mali, as used in devices/linux-sh4-stmicro-ST7108-g++, so
create an imported target for each one. Also populate the
Qt5Gui_EGL_LIBS variable with all created imported targets. Similar
variables are created for the used OPENGL implementation.
In the case of using the packaged ANGLE library, we already know the
exact locations of the binaries.
This makes it possible for third parties to use the same GL
implementation as used by the Qt build itself. As these are used only
privately by QtGui, they are also added to the DEPENDENT_LIBRARIES
of that target so that they are found for rpath-link usage.
On some platforms (eg Raspberry Pi), multiple include directories must
be set to include egl.h, as the headers it includes for vcos are a
bit scattered.
Task-number: QTBUG-29132
Change-Id: I1126da3d37cd51c88d3670347c8b6405b285efb5
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Change-Id: I8174ca78b4e2d8b4344278acf8ca4b0db3115d1a
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Change-Id: I1d8061302fbb8494b5ae31e20a644745fe969f10
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Used by features in CMake 2.8.11.
This matches the features in FindQt4 in that version of CMake,
namely that the IMPORTED targets contain the appropriate
INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITIONS
and that the qtmain.lib static library is automatically linked to
on Windows by executables. Additionally, the
INTERFACE_POSITION_INDEPENDENT_CODE property is set appropriately
if Qt requires users to use position independent code.
Change-Id: Ide341f43fcaf7d722a7bdf1a12b1071c7e548ccc
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Instead of first finding it and then testing that we can find it.
Change-Id: I1a1090693520b1d6adadef93839f25d277947e76
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Task-number: QTBUG-28540
Change-Id: I916d104c8aba551ee9a5b34da3fd85dcb26bbf64
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Change-Id: Ib6347360d678bbe54445ebb0680ad66d77a7f3c7
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
There is no need to list the dependencies of the Widgets module.
Change-Id: I9469d4f352685f7122a258f1a44bd017fdc5b3a7
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>