summaryrefslogtreecommitdiffstats
path: root/cmake/Functions.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Functions.cmake')
-rw-r--r--cmake/Functions.cmake17
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()