diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Functions.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake index b954654bf..89dff400f 100644 --- a/cmake/Functions.cmake +++ b/cmake/Functions.cmake @@ -39,3 +39,20 @@ function(add_check_for_support errorResult supportResult) endif() endif() endfunction() + +function(get_qt_features outList module) + get_cmake_property(variableList VARIABLES) + set(_featureList "") + foreach (variableKey ${variableList}) + unset(FOUND) + string(REGEX MATCH QT_FEATURE_${module} FOUND ${variableKey}) + if (FOUND) + list(APPEND _featureList "${variableKey}=${${variableKey}}") + endif() + endforeach() + if ("${${outList}}" STREQUAL "") + set(${outList} ${_featureList} PARENT_SCOPE) + else() + set(${outList} "${${outList}}" "${_featureList}" PARENT_SCOPE) + endif() +endfunction() |