diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-08-07 10:46:06 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-08-09 09:05:54 +0000 |
commit | 1e9ee0ce1ded922786f8786a40e32ca81d454b55 (patch) | |
tree | 1ebd7eb3b28e93099d850b871fba9eae06bd93fc /cmake | |
parent | 76cf08a886777217e02f4e101b4189062c062d51 (diff) |
CMakeLists: Allow for internal plugin registration
add_qtc_plugin now takes a flag "INTERNAL_ONLY". These internal plugins
will not show up in the project configuration nor in the feature summary.
This flag is used by the tests that build plugins.
Change-Id: I1912dd62221b2624ed7326df381fbbceccefbdac
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtCreatorAPI.cmake | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index 003ac10c30..ea959d6787 100644 --- a/cmake/QtCreatorAPI.cmake +++ b/cmake/QtCreatorAPI.cmake @@ -362,7 +362,7 @@ endfunction(add_qtc_library) function(add_qtc_plugin target_name) cmake_parse_arguments(_arg - "EXPERIMENTAL;SKIP_DEBUG_CMAKE_FILE_CHECK;SKIP_INSTALL" + "EXPERIMENTAL;SKIP_DEBUG_CMAKE_FILE_CHECK;SKIP_INSTALL;INTERNAL_ONLY" "VERSION;COMPAT_VERSION;PLUGIN_JSON_IN;PLUGIN_PATH;PLUGIN_NAME;OUTPUT_NAME" "CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;PUBLIC_DEFINES;INCLUDES;PUBLIC_INCLUDES;PLUGIN_DEPENDS;PLUGIN_RECOMMENDS;SOURCES;EXPLICIT_MOC" ${ARGN} @@ -392,7 +392,11 @@ function(add_qtc_plugin target_name) if (DEFINED ENV{QTC_${_build_plugin_var}}) set(_build_plugin_default "$ENV{QTC_${_build_plugin_var}}") endif() - set(${_build_plugin_var} "${_build_plugin_default}" CACHE BOOL "Build plugin ${name}.") + if (_arg_INTERNAL_ONLY) + set(${_build_plugin_var} "${_build_plugin_default}") + else() + set(${_build_plugin_var} "${_build_plugin_default}" CACHE BOOL "Build plugin ${name}.") + endif() if ((${_arg_CONDITION}) AND ${_build_plugin_var}) set(_plugin_enabled ON) @@ -400,7 +404,9 @@ function(add_qtc_plugin target_name) set(_plugin_enabled OFF) endif() - add_feature_info("Plugin ${name}" _plugin_enabled "${_extra_text}") + if (NOT _arg_INTERNAL_ONLY) + add_feature_info("Plugin ${name}" _plugin_enabled "${_extra_text}") + endif() if (NOT _plugin_enabled) return() endif() |