Commit Graph

2139 Commits

Author SHA1 Message Date
Albert Astals Cid
5e339a0f97 cmake: Add trivial FindLibproxy.cmake
And fix link to it

Change-Id: Ie4f29a35a83d19ab83933faf3bcd7d62cffa68b8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-29 15:07:54 +00:00
Tobias Hunger
6a1ee4de07 CMake: Store Qt features in CMake Cache
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>
2019-01-17 16:16:55 +00:00
Tobias Hunger
3ec578020c CMake: QtFeature optimization
Remove some unnecessary sorting, speeding up cmake by about 10s on my machine

Change-Id: Ieafbd16f6dd8cfe6d1af3c739bfe58e8bf724441
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-17 08:34:02 +00:00
Tobias Hunger
235769d56b CMake: Error out on mis-use of qt_pull_features_into_current_scope
Make it a bit harder to mis-use qt_pull_features_into_current_scope.

Change-Id: I2a6be28d7c0e6207217cb1908ec22cc757acd01a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-17 08:33:50 +00:00
Tobias Hunger
4f26758978 CMake: Introduce Qt::GlobalConfig to hold the global features
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>
2019-01-17 08:33:27 +00:00
Tobias Hunger
b705021b4e CMake: Check for visibility once
Change-Id: I5c729f4509eed16409df5eb048afb7f60c5ca57c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-01-16 11:07:23 +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
ff693d664b CMake: Remove one unnecessary feature push into parent scope
During qt_feature_begin_module no features are changed, so there is
no need to push features.

Change-Id: Id7ebcfad373caa284e790b7eb0a178eaa72216e5
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-14 12:27:44 +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
Tobias Hunger
07dfa3013c CMake: Get rid of useless underscores in QtFeature.cmake
Change-Id: I87eb55ed2ce01ab136dac3e2a587b43bd3f8a98e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-14 14:00:32 +00:00
Tobias Hunger
42d6e5c5fa CMake: Simplify
* 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>
2018-12-14 14:00:21 +00:00
Tobias Hunger
3a8d8344e5 CMake: Merge qt_internal_module_include_dir and qt_internal_module_info
... 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>
2018-12-14 14:00:11 +00:00
Tobias Hunger
ece38e7e18 CMake: Unify creation of target aliases
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>
2018-12-14 14:00:02 +00:00
Tobias Hunger
78d34c3a30 CMake: Refactor qt module name related code
Change-Id: Ib14c030ef6d2e988aaaebca354cf1a6881e05e25
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2018-12-14 11:43:00 +00:00
Tobias Hunger
8d5c9ebf8c Prefer qt_internal_ over _qt_ for internal functions
Change-Id: Idb6f3d8f29890bb4d8f0d1d644c0d1103342946a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
2018-12-14 08:44:02 +00:00
Tobias Hunger
c22dcf6ae1 CMake: Unify on variable names without _ in functions
Change-Id: I28883775d8f9bd718de477c03628b291972f4590
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
2018-12-14 08:37:22 +00:00
Tobias Hunger
a2da0175cd CMake: Do less feature-pushing
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>
2018-11-22 15:20:59 +00:00
Tobias Hunger
74e9278553 CMake: Simplify registration of known Qt targets
Change-Id: Ibd7b5f628c0a1a3087bdfebb0c35242b42c5e938
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-22 15:20:42 +00:00
Tobias Hunger
24fe921161 CMake: Add simple test for moc handling and fix the implementation
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>
2018-11-22 15:20:17 +00:00
Tobias Hunger
13e1c93e37 CMake: Add test for QRC and make it pass
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>
2018-11-22 15:19:41 +00:00
Tobias Hunger
f4dc3dcacb CMake: Add test for uic handling
Add a test for uic handling and make it pass.

Change-Id: I7e11f9f1fba0e40c748e3590a0d0cbb72c9ebc28
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-22 15:19:22 +00:00
Tobias Hunger
c68e5fc59b CMake: Add macro to generate cmake build-only tests
In addition to cmake tests that run cmake, build and then run the
tests of that project, also add a macro for tests that only run
cmake.

Use this new kind of test for the existing tests.

Change-Id: I465600974ed4114e724988b309404ccd3db2e0cb
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-22 12:45:35 +00:00
Tobias Hunger
bdb5e2a48e CMake: Simplify qt_make_output_file
Simplify qt_make_output_file and add a simple test for it.

Change-Id: I87694291cd877545ade5d9c42d1424d7b3b7b567
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-22 10:38:04 +00:00
Tobias Hunger
fac800ad1c CMake: Fix cmake test for features
Features are now always defined (to OFF) when they are not emitted.

Adapt the test for that.

Change-Id: Id5f662f07fea15c22027b9b00d1b53a288b4a0dc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-22 08:39:15 +00:00
Tobias Hunger
f37ce9ab84 CMake: Add option to run cmake build tests
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>
2018-11-22 08:39:12 +00:00
Tobias Hunger
eb2ece3c59 CMake: Add FindSlog2
Add FindSlog2 and use it in src/corelib/configure.cmake.

Change-Id: I7e6a696a49df568a41ed1224228ab608db2dbb0e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-06 15:24:55 +00:00
Tobias Hunger
38f1a10b6f CMake: Improve handling of the different kinds of iconv
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>
2018-11-06 15:24:35 +00:00
Tobias Hunger
e11522726b CMake: Add FindPPS and use it in src/corelib/configure.cmake
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>
2018-11-06 15:24:17 +00:00
Tobias Hunger
bebbb41030 CMake: Find librt
Change-Id: Ibc39ba7a385146cd0428b78e12a793f0ddbfae91
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-06 15:24:07 +00:00
Mikhail Svetkin
1dd5acf9aa CMake: Fix import of features while generating CMakeLists
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>
2018-11-06 14:32:48 +00:00
Tobias Hunger
cda5d06bd8 CMake: Fix import of features
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>
2018-11-05 15:44:43 +00:00
Tobias Hunger
b7b4af575f CMake: Simplify Feature handling
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>
2018-11-05 15:01:58 +00:00
Tobias Hunger
3b74e0cc0b QtFeature: (Re-)evaluate QT_FEATURES based on cached values
(Re-)evaluate QT_FEATURE_* based on the corresponding cache values
named FEATURE_*.

Change-Id: I57e76af90221937e45979a6d0c366923983ca7d5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:55:04 +00:00
Tobias Hunger
86098596ca QtFeature: Prefix temporary values with _
This gets makes it easier to see the QT_FEATURE_foo variables;-)

Change-Id: Ide9354d90eecdb15d6d5cec7c2bfb9cee348fb29
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:54:56 +00:00
Tobias Hunger
ec510d0ebc Store QT_FEATUREs that are not emitted
Store QT_FEATUREs that are not emitted, but do not show them in the UI. Also separate
out the UI (FEATURE_foo) from the internal CMake value (QT_FEATURE_foo). This does
break the overriding of settings, but that did not work well before either. This
will be fixed in follow-up patches.

Remove fallout: xkbcommon_system was now evaluated where it was not before. Remove
it as that is always the case now.

Change-Id: I2d303827a1cc9afeef93ad73285a2043ddaa9766
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:54:48 +00:00
Tobias Hunger
b102b41be7 Add ATSPI2 library support
Change-Id: I304ba2b9df65008340b698eb3a74dc3b4abfb826
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-01 11:49:38 +00:00
Tobias Hunger
b5aaea7998 Support dbus adaptors and interfaces
Change-Id: I06ffff19574bbb8df79adabfcc447acff09d7ecf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-01 11:49:30 +00:00
Tobias Hunger
8cea61e14d QtPostProcess: Fix generation of *Depends header files
Normalize Qt module names before trying to match them. Deduplicate the
names while at it.

Change-Id: I5821c34fe5904cf9e9b986ac3ae4af2b248466b7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-01 11:48:55 +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