How do I run a .bat file from CMake in a pre-link or a post-build event?
You could use add_custom_command, e.g.
add_custom_command
if(WIN32) add_custom_command(TARGET POST_BUILD COMMAND cmd //C ) endif()
For full details about add_custom_command run
cmake --help-command add_custom_command