cmake生成后事件

使用cmake的add_custom_command复件生成的库到../lib

1
2
3
4
5
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD    
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"$<$<CONFIG:Debug>:./debug/test-d.dll>" # debug
"$<$<CONFIG:Release>:./release/test.dll>" # release
"../lib")