POST BUILD之后的dll文件拷贝需要有目标文件名

This commit is contained in:
2025-06-19 14:17:34 +08:00
parent 71307f3e53
commit f812505a1e
2 changed files with 10 additions and 5 deletions
+4 -2
View File
@@ -60,11 +60,13 @@ target_compile_definitions(dv_utils
#################
add_custom_command(
TARGET dv_utils POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:dv_utils> ${CMAKE_BINARY_DIR}/source/console/$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>)
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:dv_utils> ${CMAKE_BINARY_DIR}/source/console/$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>/$<TARGET_FILE_NAME:dv_utils>
)
add_custom_command(
TARGET dv_utils POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:dv_utils> ${CMAKE_BINARY_DIR}/test/unit/$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>)
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:dv_utils> ${CMAKE_BINARY_DIR}/test/unit/$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>/$<TARGET_FILE_NAME:dv_utils>
)
#################
# install