CMake: Fix feature evaluation for feature defines
Passing -DFEATURE_developer_build=TRUE did not add the define QT_BUILD_INTERNAL to src/corelib/global/qconfig.h like -DFEATURE_developer_build=ON would. This happened, because the feature evaluation in qt_evaluate_feature_definition did a string comparison against "ON". Normalize both sides of the string comparison, and thus support all booly values for features. Pick-to: 6.2 Fixes: QTBUG-95732 Change-Id: Ibf03579c05919b35219438361fc93676b7cca7cc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
6dc9c89919
commit
eafbda4191
@ -492,9 +492,14 @@ function(qt_evaluate_feature_definition key)
|
||||
set(expected OFF)
|
||||
endif()
|
||||
|
||||
set(actual OFF)
|
||||
if(QT_FEATURE_${arg_FEATURE})
|
||||
set(actual ON)
|
||||
endif()
|
||||
|
||||
set(msg "")
|
||||
|
||||
if(QT_FEATURE_${arg_FEATURE} STREQUAL expected)
|
||||
if(actual STREQUAL expected)
|
||||
set(indent "")
|
||||
if(arg_PREREQUISITE)
|
||||
string(APPEND msg "#if ${arg_PREREQUISITE}\n")
|
||||
|
Loading…
x
Reference in New Issue
Block a user