diff options
Diffstat (limited to 'util')
-rwxr-xr-x | util/cmake/pro2cmake.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 21946883fd..420df3011d 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -1248,12 +1248,6 @@ def map_condition(condition: str) -> str: condition = condition.replace("*-llvm", "CLANG") condition = condition.replace("win32-*", "WIN32") - # new conditions added by the android multi arch qmake build - condition = re.sub(r'x86[^\_]', "TEST_architecture_arch STREQUAL x86", condition) - condition = condition.replace('x86_64', "TEST_architecture_arch STREQUAL x86_64") - condition = condition.replace('arm64-v8a', "TEST_architecture_arch STREQUAL arm64") - condition = condition.replace('armeabi-v7a', "TEST_architecture_arch STREQUAL arm") - pattern = r"CONFIG\((debug|release),debug\|release\)" match_result = re.match(pattern, condition) if match_result: @@ -1272,6 +1266,12 @@ def map_condition(condition: str) -> str: condition = condition.replace("&&", " AND ") condition = condition.replace("|", " OR ") + # new conditions added by the android multi arch qmake build + condition = re.sub(r'(^| )x86([^\_]|$)', "TEST_architecture_arch STREQUAL x86", condition) + condition = re.sub(r'(^| )x86_64', " TEST_architecture_arch STREQUAL x86_64", condition) + condition = re.sub(r'(^| )arm64-v8a', "TEST_architecture_arch STREQUAL arm64", condition) + condition = re.sub(r'(^| )armeabi-v7a', "TEST_architecture_arch STREQUAL arm", condition) + cmake_condition = "" for part in condition.split(): # some features contain e.g. linux, that should not be |