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)
|
if (NOT _arg_CONDITION)
|
||||||
set(_arg_CONDITION ON)
|
set(_arg_CONDITION ON)
|
||||||
endif()
|
endif()
|
||||||
if (_arg_FEATURE_INFO)
|
if (${_arg_CONDITION})
|
||||||
add_feature_info(${_arg_FEATURE_INFO} _arg_CONDITION "${_extra_text}")
|
set(_feature_enabled ON)
|
||||||
|
else()
|
||||||
|
set(_feature_enabled OFF)
|
||||||
endif()
|
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()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user