How do I run a .bat file from CMake?

后端 未结 2 944
滥情空心
滥情空心 2021-02-09 02:52

How do I run a .bat file from CMake in a pre-link or a post-build event?

2条回答
  •  遥遥无期
    2021-02-09 03:31

    You could use add_custom_command, e.g.

    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
    

提交回复
热议问题