CMake: Fix condition of the 'debug' feature

For the moment, in feature conditions that use STREQUAL, the lhs must be
a variable.

Change-Id: I56fe24baeb8067662ea81984fd48383da4c5b67b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2020-03-06 09:28:12 +01:00
parent b4f19e4277
commit a3d0ef019a
2 changed files with 2 additions and 2 deletions

View File

@ -354,7 +354,7 @@ qt_feature_config("developer-build" QMAKE_PUBLIC_QT_CONFIG
qt_feature("debug"
LABEL "Build for debugging"
AUTODETECT QT_FEATURE_developer_build OR ( WIN32 AND NOT GCC ) OR APPLE
CONDITION Debug STREQUAL CMAKE_BUILD_TYPE OR Debug IN_LIST CMAKE_CONFIGURATION_TYPES
CONDITION CMAKE_BUILD_TYPE STREQUAL Debug OR Debug IN_LIST CMAKE_CONFIGURATION_TYPES
)
qt_feature("debug_and_release" PUBLIC
LABEL "Compile libs in debug and release mode"

View File

@ -771,7 +771,7 @@ def parseFeature(ctx, feature, data, cm_fh):
"autoDetect": "1", # Setting this to None has weird effects...
"condition": "QT_GENERATOR_IS_MULTI_CONFIG"
},
"debug": {"condition": "Debug STREQUAL CMAKE_BUILD_TYPE OR Debug IN_LIST CMAKE_CONFIGURATION_TYPES"},
"debug": {"condition": "CMAKE_BUILD_TYPE STREQUAL Debug OR Debug IN_LIST CMAKE_CONFIGURATION_TYPES"},
"dlopen": {"condition": "UNIX"},
"doubleconversion": None,
"enable_gdb_index": None,