I\'m trying to copy all the binaries generated by cmake to a specific directory. I don\'t want to use EXECUTABLE_OUTPUT_PATH, keeping them in the building tree make developm
Just make sure that the target location "bin" exists before invoking the copy command, i.e.:
ADD_CUSTOM_COMMAND(TARGET example POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E copy ${EXAMPLE_BIN_NAME} ${PROJECT_BINARY_DIR}/. )