diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2019-11-14 11:23:18 +0100 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2019-11-14 10:36:37 +0000 |
commit | 7a6c6da2ebbfef33f7284ce5c96aa0c3acabc6bc (patch) | |
tree | 9b3ad11108afeebedf984212ad27dcb54a9f30d4 /util/cmake | |
parent | ad98624f7493c66560da3e2af8ed0d3759a4d2f1 (diff) | |
download | qtbase-7a6c6da2ebbfef33f7284ce5c96aa0c3acabc6bc.tar.gz |
Add more special condition conversions
Handle conversions for QT_NO_CURSOR, QT_NO_TRANSLATION and
qtConfig(opengles.).
Change-Id: Idd930f77e78f235b7997a5083ac7faf630ed9801
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'util/cmake')
-rwxr-xr-x | util/cmake/pro2cmake.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index d8753a7e2c..1d241efc8e 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -1396,6 +1396,9 @@ def unwrap_if(input_string): def map_condition(condition: str) -> str: # Some hardcoded cases that are too bothersome to generalize. + condition = re.sub(r"qtConfig\(opengles\.\)", + r"(QT_FEATURE_opengles2 OR QT_FEATURE_opengles3 OR QT_FEATURE_opengles31 OR QT_FEATURE_opengles32)", + condition) condition = re.sub( r"qtConfig\(opengl\(es1\|es2\)\?\)", r"QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3", @@ -1506,6 +1509,14 @@ def map_condition(condition: str) -> str: condition = re.sub(r"(^| )arm64-v8a", "TEST_architecture_arch STREQUAL arm64", condition) condition = re.sub(r"(^| )armeabi-v7a", "TEST_architecture_arch STREQUAL arm", condition) + # some defines replacements + condition = re.sub(r"DEFINES___contains___QT_NO_CURSOR", + r"(NOT QT_FEATURE_cursor)", + condition) + condition = re.sub(r"DEFINES___contains___QT_NO_TRANSLATION", + r"(NOT QT_FEATURE_translation)", + condition) + cmake_condition = "" for part in condition.split(): # some features contain e.g. linux, that should not be |