Hello,
I am trying tor resolve a problem about the Visual Studio Generator.
In the CMakeLists, there are the following lines:
...
add_executable(${PROJECT_NAME} WIN32)
...
add_custom_command(
TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND ...
COMMAND ...
COMMAND ...)
When I configure the project with the Visual Studio 17 2022 generator, I get in Visual studio three extra targets: ALL_BUILD, INSTALL, ZERO_CHECK.
When I build the ALL_BUILD target, the sources are built, and the custom commands are executed. Fine.
When I build the INSTALL target, the install()
commands are executed, and the custom commands are also executed. Not fine.
- why ?
- how to avoid the INSTALL target run also the customs command ?
Thanks.