diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index 4e7aca2d5ec..61b45cc5efe 100644 --- a/cmake/QtCreatorAPI.cmake +++ b/cmake/QtCreatorAPI.cmake @@ -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()