diff options
Diffstat (limited to 'util')
-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 |