forked from qt-creator/qt-creator
CMake build: Fix additional feature info
They were always printed as enabled, because the condition is not evaluated within add_feature_info Change-Id: I9e50648d037aebecdb895d4ce5f4de7c1fee3ead Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -691,10 +691,15 @@ function(extend_qtc_target target_name)
|
||||
if (NOT _arg_CONDITION)
|
||||
set(_arg_CONDITION ON)
|
||||
endif()
|
||||
if (_arg_FEATURE_INFO)
|
||||
add_feature_info(${_arg_FEATURE_INFO} _arg_CONDITION "${_extra_text}")
|
||||
if (${_arg_CONDITION})
|
||||
set(_feature_enabled ON)
|
||||
else()
|
||||
set(_feature_enabled OFF)
|
||||
endif()
|
||||
if (NOT (${_arg_CONDITION}))
|
||||
if (_arg_FEATURE_INFO)
|
||||
add_feature_info(${_arg_FEATURE_INFO} _feature_enabled "${_extra_text}")
|
||||
endif()
|
||||
if (NOT _feature_enabled)
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user