CMake Custom Command Copy Multiple Files
Answer : I did it with a loop # create a list of files to copy set( THIRD_PARTY_DLLS C:/DLLFOLDER/my_dll_1.dll C:/DLLFOLDER/my_dll_2.dll ) # do the copying foreach( file_i ${THIRD_PARTY_DLLS}) add_custom_command( TARGET ${VIEWER_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy ${file_i} "C:/TargetDirectory" ) endforeach( file_i ) Copying multiple files is available from CMake 3.5 cmake -E copy <file>... <destination> "cmake -E copy" support for multiple files Command-Line Tool Mode A relatively simple workaround would be to use ${CMAKE_COMMAND} -E tar to bundle the sources, move the tarball and extract it in the destination directory. This could be more trouble than it's worth if your sources are scattered across many different directories, since extracting would retain the original directory structure (unlike using cp ). If all the files are in one directory however, you could achieve the copy in jus...