forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
Cristian Adam
parent
b15fce086e
commit
0439eea6bc
@@ -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)
|
||||
|
@@ -3,4 +3,5 @@ add_qtc_plugin(plugin1
|
||||
SOURCES
|
||||
plugin1.cpp plugin1.h
|
||||
PLUGIN_PATH "${TEST_PLUGIN_PATH}"
|
||||
SKIP_INSTALL
|
||||
)
|
||||
|
@@ -3,4 +3,5 @@ add_qtc_plugin(plugin2
|
||||
SOURCES
|
||||
plugin2.cpp plugin2.h
|
||||
PLUGIN_PATH "${TEST_PLUGIN_PATH}"
|
||||
SKIP_INSTALL
|
||||
)
|
||||
|
@@ -3,4 +3,5 @@ add_qtc_plugin(plugin3
|
||||
SOURCES
|
||||
plugin3.cpp plugin3.h
|
||||
PLUGIN_PATH "${TEST_PLUGIN_PATH}"
|
||||
SKIP_INSTALL
|
||||
)
|
||||
|
@@ -4,4 +4,5 @@ add_qtc_plugin(correct_plugin1
|
||||
SOURCES
|
||||
plugin1.cpp plugin1.h
|
||||
PLUGIN_PATH "${TEST_PLUGIN_PATH}"
|
||||
SKIP_INSTALL
|
||||
)
|
||||
|
@@ -4,4 +4,5 @@ add_qtc_plugin(correct_plugin2
|
||||
SOURCES
|
||||
plugin2.cpp plugin2.h
|
||||
PLUGIN_PATH "${TEST_PLUGIN_PATH}"
|
||||
SKIP_INSTALL
|
||||
)
|
||||
|
@@ -4,4 +4,5 @@ add_qtc_plugin(correct_plugin3
|
||||
SOURCES
|
||||
plugin3.cpp plugin3.h
|
||||
PLUGIN_PATH "${TEST_PLUGIN_PATH}"
|
||||
SKIP_INSTALL
|
||||
)
|
||||
|
@@ -15,6 +15,7 @@ add_qtc_plugin(testplugin
|
||||
PLUGIN_PATH "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
PROPERTIES
|
||||
OUTPUT_NAME ${plugin_output_name}
|
||||
SKIP_INSTALL
|
||||
)
|
||||
|
||||
# The empty string gets removed if I put it above
|
||||
|
@@ -4,4 +4,5 @@ add_qtc_executable(echo
|
||||
SOURCES
|
||||
echoclangcodemodelserver.cpp echoclangcodemodelserver.h
|
||||
echoserverprocessmain.cpp
|
||||
SKIP_INSTALL
|
||||
)
|
||||
|
Reference in New Issue
Block a user