diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2019-06-03 15:07:27 +0200 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2019-06-05 08:28:49 +0000 |
commit | 0439eea6bcbff70a4aacfee3d0dc048f9c402131 (patch) | |
tree | 91efaf050c58d2eadee9c36294a6f97597d70662 /src/CMakeLists.txt | |
parent | b15fce086eac752bf25edd5eb138f92df7e2ce4f (diff) | |
download | qt-creator-0439eea6bcbff70a4aacfee3d0dc048f9c402131.tar.gz |
CMake build: Skip installation of test plugins / executables
Our tests run from the build folder. We do not need to install them.
Change-Id: Iaeb27e466fe0d43bc15fa3eee3bf6d2659b87083
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 01fb642e91..b59ba91aec 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -213,7 +213,7 @@ endfunction() function(add_qtc_plugin target_name) cmake_parse_arguments(_arg - "EXPERIMENTAL;SKIP_DEBUG_CMAKE_FILE_CHECK" + "EXPERIMENTAL;SKIP_DEBUG_CMAKE_FILE_CHECK;SKIP_INSTALL" "VERSION;COMPAT_VERSION;PLUGIN_JSON_IN;PLUGIN_PATH;PLUGIN_NAME;OUTPUT_NAME" "CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;INCLUDES;PUBLIC_INCLUDES;PLUGIN_DEPENDS;PLUGIN_RECOMMENDS;SOURCES;EXPLICIT_MOC" ${ARGN} @@ -361,11 +361,13 @@ function(add_qtc_plugin target_name) set_explicit_moc(${target_name} "${file}") endforeach() - install(TARGETS ${target_name} - LIBRARY DESTINATION "${plugin_dir}" - ARCHIVE DESTINATION "${plugin_dir}" - RUNTIME DESTINATION "${plugin_dir}" - ) + if (NOT _arg_SKIP_INSTALL) + install(TARGETS ${target_name} + LIBRARY DESTINATION "${plugin_dir}" + ARCHIVE DESTINATION "${plugin_dir}" + RUNTIME DESTINATION "${plugin_dir}" + ) + endif() endfunction() function(extend_qtc_target target_name) @@ -419,7 +421,7 @@ function(extend_qtc_plugin target_name) endfunction() function(add_qtc_executable name) - cmake_parse_arguments(_arg "" "DESTINATION" "DEFINES;DEPENDS;INCLUDES;SOURCES;PROPERTIES" ${ARGN}) + cmake_parse_arguments(_arg "SKIP_INSTALL" "DESTINATION" "DEFINES;DEPENDS;INCLUDES;SOURCES;PROPERTIES" ${ARGN}) if ($_arg_UNPARSED_ARGUMENTS) message(FATAL_ERROR "add_qtc_executable had unparsed arguments!") @@ -469,7 +471,9 @@ function(add_qtc_executable name) ${_arg_PROPERTIES} ) - install(TARGETS ${name} DESTINATION "${_DESTINATION}") + if (NOT _arg_SKIP_INSTALL) + install(TARGETS ${name} DESTINATION "${_DESTINATION}") + endif() endfunction() function(extend_qtc_executable name) |