Use only supported values when setting internal QT_FEATURE_ values

When setting QT_FEATURE_ values we need to convert the user-provided
FEATURE_ values to the one that is supported by QT_FEATURE_.

Pick-to: 6.2
Fixes: QTBUG-96300
Change-Id: Idd19fbf7f23f351a6c1cfdcedccfaaf6b0aa6e44
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Alexey Edelev 2021-09-20 17:30:08 +02:00
parent 080bbb9f8b
commit 68ad67b6fa

View File

@ -269,7 +269,11 @@ endfunction()
# Saves the final user value to QT_FEATURE_${feature}, after checking that the condition is met.
macro(qt_feature_check_and_save_internal_value
feature saved_user_value condition label conditionExpression)
set(result "${saved_user_value}")
if(${saved_user_value})
set(result ON)
else()
set(result OFF)
endif()
if ((NOT condition) AND result)
_qt_internal_dump_expression_values(conditionDump "${conditionExpression}")