Use qt_evaluate_config_expression for feature enable conditions
Certain features like opengles2 can be enabled or disabled based on the conditions that are specified in the ENABLE and DISABLE parameters. Because some of those conditions use STREQUAL with a single quoted argument, we have to use qt_evaluate_config_expression to circumvent the CMake bug regarding single quotes, which is described in the function implementation. Only then will enabling / disabling work correctly. Change-Id: I3b68ef611c985f0d8416fd089055fd862da1e542 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
parent
42ae8218b1
commit
6ca047aba9
@ -224,9 +224,11 @@ function(qt_evaluate_feature feature)
|
||||
qt_evaluate_config_expression(condition ${arg_CONDITION})
|
||||
endif()
|
||||
|
||||
if(${arg_DISABLE})
|
||||
qt_evaluate_config_expression(disable_result ${arg_DISABLE})
|
||||
qt_evaluate_config_expression(enable_result ${arg_ENABLE})
|
||||
if(${disable_result})
|
||||
set(result OFF)
|
||||
elseif((${arg_ENABLE}) OR (${arg_AUTODETECT}))
|
||||
elseif((${enable_result}) OR (${arg_AUTODETECT}))
|
||||
set(result ${condition})
|
||||
else()
|
||||
# feature not auto-detected and not explicitly enabled
|
||||
|
Loading…
x
Reference in New Issue
Block a user