From 68ad67b6faf6922c66ddafee0dc055666a73cddd Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Mon, 20 Sep 2021 17:30:08 +0200 Subject: 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 Reviewed-by: Qt CI Bot --- cmake/QtFeature.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake index fc2fb8f529..5ad96439b9 100644 --- a/cmake/QtFeature.cmake +++ b/cmake/QtFeature.cmake @@ -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}") -- cgit v1.2.3