pro2cmake: Handle one more hardcoded condition CONFIG(osx)

We can't really handle this in a generic way now, because the values
of CONFIG() can not be directly mapped to features. It might be
possible in the future if we make sure that all configure.json entries
that have output publicConfig or privateConfig also generate a
feature. For now just hardcode the case.

Change-Id: Ie6b82b87973deb84012c3620b41920b343ffb2da
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Alexandru Croitor 2019-09-25 13:48:26 +02:00
parent 7bed351c6c
commit 316353b3e0

View File

@ -1488,6 +1488,7 @@ def map_condition(condition: str) -> str:
condition = re.sub(r"^no-png$", r"NOT QT_FEATURE_png", condition)
condition = re.sub(r"contains\(CONFIG, static\)", r"NOT QT_BUILD_SHARED_LIBS", condition)
condition = re.sub(r"contains\(QT_CONFIG,\w*shared\)", r"QT_BUILD_SHARED_LIBS", condition)
condition = re.sub(r"CONFIG\(osx\)", r"APPLE_OSX", condition)
def gcc_version_handler(match_obj: Match):
operator = match_obj.group(1)