summaryrefslogtreecommitdiffstats
path: root/cmake/QtFeature.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/QtFeature.cmake')
-rw-r--r--cmake/QtFeature.cmake24
1 files changed, 20 insertions, 4 deletions
diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake
index d8f031f5b27..6b218a8925a 100644
--- a/cmake/QtFeature.cmake
+++ b/cmake/QtFeature.cmake
@@ -595,7 +595,11 @@ function(_qt_feature_evaluate_alias out_var alias)
set(not_kw "NOT")
endif()
# Evaluate the value and return it
- qt_set01(${out_var} ${not_kw} FEATURE_${alias})
+ if(${not_kw} FEATURE_${alias})
+ set(${out_var} 1)
+ else()
+ set(${out_var} 0)
+ endif()
set(${out_var} "${${out_var}}" PARENT_SCOPE)
# Also set `not_kw` since it would be reused by the caller
set(not_kw "${not_kw}" PARENT_SCOPE)
@@ -607,7 +611,11 @@ function(_qt_feature_check_feature_alias feature)
if(DEFINED "FEATURE_${feature}")
# The main feature was already defined, use the current value.
# Just check if the other aliases have agreeing values.
- qt_set01(expected_value FEATURE_${feature})
+ if(FEATURE_${feature})
+ set(expected_value 1)
+ else()
+ set(expected_value 0)
+ endif()
unset(alias_value)
foreach(alias IN LISTS _QT_FEATURE_ALIASES_${feature})
_qt_feature_evaluate_alias(alias_value ${alias})
@@ -676,7 +684,11 @@ function(_qt_feature_check_cache_alias feature)
# Check if the feature is set by another alias
unset(expected_value)
_qt_feature_evaluate_alias(expected_value "${feature}")
- qt_set01(cache_sanitized ${arg_ALIAS_OF_CACHE})
+ if(${arg_ALIAS_OF_CACHE})
+ set(cache_sanitized 1)
+ else()
+ set(cache_sanitized 0)
+ endif()
if(NOT DEFINED expected_value)
# If nothing else set the alias value, use the primary cache value
set("FEATURE_${feature}" "${${arg_ALIAS_OF_CACHE}}" PARENT_SCOPE)
@@ -707,7 +719,11 @@ function(_qt_feature_save_alias feature)
if(arg_ALIAS_NEGATE)
set(not_kw "NOT")
endif()
- qt_set01(value ${not_kw} FEATURE_${feature})
+ if(${not_kw} FEATURE_${feature})
+ set(value 1)
+ else()
+ set(value 0)
+ endif()
qt_evaluate_to_boolean(value)
# Set the values based on the main feature's value
set(FEATURE_${alias} ${value} CACHE BOOL