Tool-CMake-add_custom_command-copy
Tool-CMake-add_custom_command-copy
https://cmake.org/cmake/help/latest/command/add_custom_command.html?highlight=add_custom_command
add_custom_command(TARGET <target>
PRE_BUILD | PRE_LINK | POST_BUILD
COMMAND command1 [ARGS] [args1...]
[COMMAND command2 [ARGS] [args2...] ...]
[BYPRODUCTS [files...]]
[WORKING_DIRECTORY dir]
[COMMENT comment]
[VERBATIM] [USES_TERMINAL]
[COMMAND_EXPAND_LISTS])
copy
add_custom_command(
TARGET ${CURR_EXE_NAME}
POST BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy ${CURR_EXE_NAME} ${PROJECT_BINARY_DIR}
)
copy_directory
本文来自博客园,作者:Theseus‘Ship,转载请注明原文链接:https://www.cnblogs.com/yongchao/p/17383698.html