Commit Graph

723 Commits

Author SHA1 Message Date
Tobias Hunger
db3cc89185 CMake: Fix include path handling in pro2cmake.py
Change-Id: Ice9db97db5bf1fb347bff07bcaf91daac87fa983
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-18 08:50:59 +00:00
Tobias Hunger
9162aa5da9 CMake: pro2cmake: fix include file handling
Do not include the same file over and over again...

Change-Id: Ia0748b9ebe58388549ba23ec7e24ce3d9b738987
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-18 08:50:40 +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
54d372ea67 pro2cmake: Clean up linter and pypi issues
Also remove one stray line of debug output

Change-Id: If3d2e0b31e5e1b1c05c321d63e8762b23f55bb66
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-07 09:37:43 +00:00
Tobias Hunger
19874e2381 pro2cmake: Be more faithful in the representation of operations
Do a better approximation of =, +=, *= and -=.

Change-Id: I94765532f278deaac330b27cd5a3f41f319c6477
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-21 10:24:12 +00:00
Tobias Hunger
f0aa8fa48e pro2cmake: Handle VPATH
Change-Id: Ia72f55489129c50ca730c42b75bbc2bda926b82f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-21 10:24:01 +00:00
Tobias Hunger
3acebfe6eb CMake: Add support to find LTTng-ust
CMake comes with a Find module for this, so use it in src/corelib/configure.cmake

Change-Id: I8f4abcb32fb10513d67c3c959310eefaf7b56d3d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-06 15:25:15 +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
Tobias Hunger
df2975236d CMake: Replace QT_FEATURE_shared with BUILD_SHARED_LIBS
Change-Id: I7f3efde01a98cd6a25de661624afbf7eda2c57af
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-06 15:23:52 +00:00
Tobias Hunger
89368f5b26 configurejson2cmake: Add generic feature mapping
Add a way to map individual parts of a feature to new values and use
that also to skip features.

Change-Id: Ibddfcbbf9dfac29d460922e991934997b3e8387b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-06 15:23:16 +00:00
Tobias Hunger
4769830034 pro2cmake.py: Do not try to add libraries that qmake substracts
Add a comment that a library was removed when running into "QT -= gui"
and similar lines.

Change-Id: I17b7922827f228c6b45e1e6867fdc5e316af3781
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 15:45:39 +00:00
Tobias Hunger
da7811dc75 pro2cmake: Explicitly handle for loops
Handle for loops by ignoring them:-)

Change-Id: If4716e0615f4a0fa982281b94dbd4f70ae868fd8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:58:38 +00:00
Tobias Hunger
ead9c0b1b8 pro2cmake: Handle Statements before Scopes
This fixes among other things the unit tests.

Change-Id: If9e23735d1d52cf49dc1f03749129fd726e8dea5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:58:12 +00:00
Tobias Hunger
187c466d9a pro2cmake.py: Improve debugging off included files
Change-Id: I1007a5134a3d3e9ca7e5d3cd9b23ad64f76602be
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:57:48 +00:00
Tobias Hunger
41eabf01c4 pro2cmake.py: Make handling of TEMPLATE more robust
Change-Id: I43b6dac3984b66585408c9fb91ae28c5b134fe40
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:57:40 +00:00
Tobias Hunger
96ddd79b03 CMake: Handle '-' better in pro2cmake
Do not fail on tests/benchmarks/benchmark.pro.

Change-Id: I0ffdf9d38ea6fa73856f33d44c5a428c9cab9107
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:56:23 +00:00
Tobias Hunger
f3cf1a6856 CMake: Improve handling of qtHaveModule in pro2cmake script
Map "qtHaveModule(foo)" in qmake to "TARGET Qt::Foo" in cmake.

Change-Id: I63c251f0f2dfd2e95adc996a83b528e9b4e9636e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:55:59 +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
6ae0821a09 configurejson2cmake: Sort library map
Change-Id: Ifb8aa5f1583592a9eb71a93973f17d9714628953
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-01 11:49:03 +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