<< qt-creator: make stdout work in application-output-view | Home | Cross-Compiling with mingw: "mingw mutex is not a member of std" >>

CMake: Copy files after build

If you need to e.g. bundle/copy data along your build you can use a call similar to this. Just make sure to select the target you want to 'target'.

Possible copy hooks are: PRE_BUILD | PRE_LINK | POST_BUILD

Single files

        COMMAND ${CMAKE_COMMAND} -E copy


add_custom_command(TARGET ${PROJECT_NAME}  POST_BUILD
        COMMAND ${CMAKE_COMMAND} -E copy_directory

More read: https://cmake.org/cmake/help/v3.0/command/add_custom_command.html

Tags :

Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!