Commit Graph

41752 Commits

Author SHA1 Message Date
Alexandru Croitor
ecf8644c7d Regenerate platforms plugins part 5
Change-Id: I6d480372eb62ffff46ce3102d9adf3b4a6da1b7d
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-08 16:29:02 +00:00
Alexandru Croitor
874fab1eea Regenerate platforms plugins part 4
Change-Id: I75d011fe040b96fd15b21476aeac78d8fd9ced77
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-08 16:28:55 +00:00
Alexandru Croitor
48047d4f10 Regenerate platforms plugins part 3
Change-Id: Ibc4feb3187fa1aaa1f073f23aecc1a7bd5a818c3
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-08 16:28:46 +00:00
Alexandru Croitor
cd5c259e54 Regenerate platforms plugins part 2
Change-Id: Iaaa7dde5f93f99ddec68138238bb05b0210bb2fb
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-08 16:28:38 +00:00
Alexandru Croitor
f16a409b71 Regenerate platforms plugins part 1
Change-Id: I6093874220e7be6b92b0049d57e029e8dff62615
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-08 16:28:29 +00:00
Alexandru Croitor
101148d0ae Regenerate platforminputcontexts plugins
Change-Id: I4175a1249a477c96b7824cf1e82c0822bdf02eb3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-08 16:28:19 +00:00
Joerg Bornemann
152c593423 pro2cmake: Handle QTRO_SOURCE_TREE
...which is the source root of qtremoteobjects.
Set to CMAKE_SOURCE_DIR for now.

Change-Id: I6797e170749ed01bbc1bac4daa7709d3aae1f84b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-08 16:01:36 +00:00
Joerg Bornemann
1aaa53b6db pro2cmake: Handle REPC_{SOURCE|REPLICA|MERGED}
Change-Id: I7c058bdc5a93038e7b67a727125c315062560d8f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-08 16:01:27 +00:00
Joerg Bornemann
37c330fe07 pro2cmake: Handle QLALRSOURCES
Change-Id: I8e6b2d542c96947d487b934c27544a8a4ae8745c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-08 15:48:39 +00:00
Joerg Bornemann
82c86856d1 pro2cmake: Use get_files for STATECHARTS
...to get proper variable replacements.

Change-Id: I533a6abfbc7721313840fd75125eeaa7b26f2eba
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-08 15:48:30 +00:00
Leander Beernaert
5260c1d62a Update add_qml_module() to use INSTALL_QML_FILES
Update add_qml_module() to use the new INSTALL_QML_FILES argument from
qt6_add_qml_module().

This patch also updates pro2cmake.py to remove the QT_QML_SOURCE_INSTALL
property from qml files.

Change-Id: I6623b2de76bb55bd6750e48f7d45c53ca536b391
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-08 13:42:17 +00:00
Leander Beernaert
1a4f0e2583 Update add_qml_module to use DO_NOT_INSTALL_METADATA
Update to match latest changes to QtDeclarative.

Change-Id: Ie455c0418e95c288149b4b1a29b065a8876e8b7e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-08 13:28:20 +00:00
Alexandru Croitor
6704ed450b Regenerate sqldrivers plugins
Change-Id: I583b5936205495813cdb0f04fcdd2da3c7e2a3f4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-08 13:26:02 +00:00
Alexandru Croitor
319f81126b Annotate some projects that should not to be regenerated
Because they are completely custom written.

Change-Id: I2f3d2e82ebf037a7bf42b3112fe4282589322b0e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-08 13:12:00 +00:00
Alexandru Croitor
a546492481 pro2cmake: Allow skipping regeneration of a project via inline marker
If a CMakeLists.txt file has the special marker
 # special case skip regeneration

then pro2cmake will skip the convertion of the .pro file that is
present in the same folder as the CMakeLists.txt file.

The --ignore-skip-marker can be used to force conversion of such
a project file.

Change-Id: I73aae742d1843148b5c22217cb3fc6b0f8e87b82
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-08 13:11:42 +00:00
Alexandru Croitor
6ccde9eec5 Regenerate styles plugins
Change-Id: I6b34fec0d6421e7523be0eb235495e6ab9b8df00
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-08 13:11:26 +00:00
Alexandru Croitor
72bf2fbe42 Regenerate generic plugins
Change-Id: I8f009d629a977dcdf79535b3e0b1c4bdd0b89688
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-08 13:11:09 +00:00
Alexandru Croitor
6c452e2276 Regenerate platformthemes plugins
Change-Id: I1073bcc5467c345a4d6889a6bf5ba2ab484db050
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-08 13:10:58 +00:00
Alexandru Croitor
274571f6d5 Regenerate printsupport plugins
Change-Id: I3820d86bf4a36dd8ea53e5847c8d4de4b1ea9c61
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-08 13:10:32 +00:00
Alexandru Croitor
115a76297b Regenerate plugins bearer and imageformats projects
Change-Id: I8858aaf6b96ea030a3af143099aee5dfd15655c8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-08 13:10:01 +00:00
Alexandru Croitor
9ff225b0e0 Regenerate platformsupport projects
Change-Id: I6f9d6b09a0b62171adedffa326b86f57e42ad449
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-08 13:09:50 +00:00
Alexandru Croitor
4c06abb8dc Regenerate tools projects
Change-Id: I69a56ca2bd1d5f983197c6cde400c191c5dc7bd9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-08 13:09:38 +00:00
Alexandru Croitor
361a24ae1c run_pro2cmake: Fix the file preference sorter
When invoking the script with "." as the only argument, and there
are multiple .pro files in the current directory, the script would
not choose the correct preferred .pro file (the one that has the
same name as the current directory).

Fix the sorter to handle such a case.

Change-Id: I6df70d7c577649f8854bca9b8879f13bdb1b4d26
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-08 11:42:15 +00:00
Simon Hausmann
a48a3e95cf Clean up tinycbor handling
Now that pro2cmake handles the include path resolution more like qmake,
the tinycbor wrapper target is not needed anymore.

Re-generated some CMakeLists.txt to complete that step.

Change-Id: I032b2e9bdf9e26f63f3c550d7bca5df93369a82a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-08 09:49:07 +00:00
Alexandru Croitor
d56e627427 pro2cmake: Don't add default Qt libraries to bootstrapped tools
Change-Id: I3ccc20ed5fcd2eaceb5af09df4a8bf7ccb2d525f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-07 22:46:09 +00:00
Alexandru Croitor
cb90784eb1 Regenerate qmake and bootstrap projects
Change-Id: I6649a58752309a346bc03271f17fe80d0b727be3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-07 22:45:53 +00:00
Alexandru Croitor
bdb8a5f664 Regenerate gui and network to handle source subtractions using script
Change-Id: Ifd7014b90e3eb054079de8904d9812cfd28b664d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-07 22:45:29 +00:00
Alexandru Croitor
2c4a4ca5d1 Regenerate corelib
Change-Id: I3bf8dfd152e7b8607a7bcbf4393839db443f007a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-07 22:45:15 +00:00
Alexandru Croitor
887a56f8cc pro2cmake: Handle parentheses in if() scopes better
The unwrap_if handler just removed the if keyword from a condition
expression, and return the rest of the condition as-is. This proves
not be enough, because map_condition splits on spaces and tries
to map platform keywords, which would fail for values like "unix)".

Change unwrap_if to add additional space between the values in the
parentheses.

Change-Id: I769ab430363d008a9fd91eaba014c88bd5ee43bd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-07 22:44:55 +00:00
Alexandru Croitor
dca364ed19 pro2cmake: Fix QT_BUILD_TREE variable mapping
CMake doesn't have a PROJECT_BUILD_DIR variable, but it does have a
PROJECT_BINARY_DIR variable.

Note that this might still be the wrong thing to do according to
35a30c7ebb , but it's still somwehat
better.

Change-Id: I493f82a791d933a16011d91774aaac4bcaffc5e5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-07 22:44:42 +00:00
Ville Voutilainen
1569c6d85e Restore top-level build with a separate function
We have other helper functions like this, and the way they are made
to work is to pass the script's arguments down to them.

Change-Id: I3b80e82a2fb3d6e6a65b2deca3b60e4e0dd8de07
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-07 14:59:49 +00:00
Alexandru Croitor
b86630b4b0 pro2cmake: Allow disabling condition cache
New option --skip-condition-cache allows forcing recomputation of
condition simplification.
Useful when debugging certain condition mappings.

Change-Id: I68a85c2e4085ad7a3043d7334db71a334a6469e9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-07 13:36:11 +00:00
Frederik Gladhorn
f55565b77a Fix pro2cmake.py path replacement
I forgot to add .items() in ed35e1ac84.

Change-Id: Ic46134daffa8f1a1b5b59040c8bcca76d32dbb35
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-07 09:16:18 +00:00
Frederik Gladhorn
ed35e1ac84 CMake: clean up target.path and DESTDIR replacements
Change-Id: I0891008cff939aa98b39a28a23710add0781901e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-07 08:58:37 +00:00
Frederik Gladhorn
123ef6c391 CMake: allow $$[QT_INSTALL_PREFIX]
This is used in QtPurchasing.

Change-Id: I29c3a87d844eeaf3fd1b64057e33d64054f14a89
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-07 08:57:58 +00:00
Frederik Gladhorn
7bca6edc16 cmake: add tests in corelib/serialization
The DEFINES -= QT_NO_LINKED_LIST is no longer needed, so just remove it
from .pro and CMakeLists.txt.
Handle $$[QT_INSTALL_TESTS] and $$TARGET in target.path.
When we have DESTDIR set, do not use target.path for OUTPUT_DIRECTORY.

Fixes: QTBUG-78219
Change-Id: I5161a955b25ff2f3b35428dc4b935a7c9d2d425b
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2019-10-07 08:57:31 +00:00
Leander Beernaert
9e5e98047e Add expansion for QQC2_SOURCE_TREE
Test in QtQuickControls2 rely on this variable, which basically points
to the root of the project. We can't use PROJECT_SOURCE_DIR since it
will vary depending on whether we build tests as stanadlone or part
of the build.

Change-Id: Ic59a79af2b4b62611d6c32391c936e98e469dea0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-07 07:46:11 +00:00
Frederik Gladhorn
d8c3375dbd cmake: add examples/opengl
Fixes: QTBUG-78164
Change-Id: Iccc8bb1354d2362c950de17a6c00e00f95272967
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-07 07:22:17 +00:00
Frederik Gladhorn
331d1cf9fd cmake: add examples/vulkan
Fixes: QTBUG-78216
Change-Id: Id7d936ab0b3febc6b7ad3170ec2ea67836484217
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-07 07:22:09 +00:00
Frederik Gladhorn
a594629602 cmake: Add find ICU to fix building test
This fixes building of tests, which are currently all failing in
auto/corelib/time/qtimezone.

Change-Id: I6183217d51b5636651da9026f71353cdde1e2444
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-04 22:01:37 +00:00
Frederik Gladhorn
18cf9b24cb cmake: add tests/auto/corelib/itemmodels
Fixes: QTBUG-78217
Change-Id: Ic2c343ab3cb1d86b9649e8ef242c7cd180f73c60
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-04 13:45:40 +00:00
Frederik Gladhorn
b3b2c799f8 cmake: add tests in corelib/time
Change-Id: Idcd5d1be7503b50a43954c1b209e48a32cc8eaa9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-04 06:30:36 +00:00
Frederik Gladhorn
a98f64af91 cmake: add more tests in corelib/thread
This fixes the qatomicinteger magic by making $$basename work for one
particular case.

qthreadstorage still needs investigation.

Task-number: QTBUG-78221
Change-Id: I7bb38f6ca24273bcf0443ab25685c8e815814c3c
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-04 06:27:19 +00:00
Albert Astals Cid
e1beabc3b8 cmake: Add missing CLASS_NAME
Change-Id: I5853578f427ae1d1b32ee5405694c216e2dd17cf
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-10-03 15:35:26 +00:00
Mårten Nordheim
c718213548 Make SDL2 library-mapping use a wrapper
Since at least one system provides config files without an included
target.

Change-Id: If1f336aab4cec9704412349d7951849ee8c3dabb
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-03 10:45:58 +00:00
Alexandru Croitor
1b0710a393 pro2cmake: Handle SOURCES subtractions
SOURCES -= foo.cpp statements should now be handled correctly by the
script. The script uses the same principle as for subdir handling:
go through all scopes to collect source removals, and then generate
new scopes with total conditions that take into account both
additions and subtractions and their conditions.

Should handle NO_PCH_SOURCES case as well.

Tested on gui.pro, network.pro and qtconnectivity bluetooth.pro.

Change-Id: I0cc913ef64cecf09e8ada4e6a3ce3ccb4365b44e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-10-01 14:16:14 +00:00
Alexandru Croitor
f23b7e1476 Implement persistent caching for simplify_condition
Store the results of simplify_condition in a json cache file,
next to the pro2cmake.py script.
Dramatically speeds up re-conversion of projects.

The cache is cleared whenever the content of the
condition_simplifier.py file changes, effectively presuming that the
condition computing code has changed.

Sample times.
Initial corelib.pro conversion - 142.13 seconds.
Next re-conversion with hot cache - 1.17 seconds.

Change-Id: I8790b2736358236e4b23bcb5f10f45a36fdfa426
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-01 14:14:16 +00:00
Alexandru Croitor
590213e531 Move sympy condition simplification code into separate file
Change-Id: I3f062bf939b452bb41b7a27508a83cbf93abff8c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-01 14:13:12 +00:00
Johan Klokkhammer Helsing
447c868a5d CMake: Generate wayland protocol code for examples as well
Task-number: QTBUG-78177
Change-Id: Id1c49013244e5ba51b99c1538b314181efe786fb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-01 13:49:18 +00:00
Oliver Wolff
e81441421b cmake: Add IOBluetooth to list of apple system frameworks
The framework is needed for qtconnectivity.

Change-Id: I6a502564fb5543ca94ba5ae458a544286e34564c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-01 13:41:25 +00:00