[Cmake] Dependency on generated file
Ken Martin
ken.martin@kitware.com
Tue, 13 May 2003 09:18:03 -0400
> # add a post build command (confusing...)
> ADD_CUSTOM_COMMAND(
> SOURCE generator
> COMMAND ${EXECUTABLE_OUTPUT_PATH}/generator${EXE_EXTENSION}
> ARGS your_args
> TARGET generator
> OUTPUTS ${PROJECT_BINARY_DIR}/out.c)
Actually to be safe on windows you need to put CMAKE_CFG_INTDIR in the
path to the exec as well. So the command should be closer to..
COMMAND
${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/generator${EXE_EXTENSION}