How to create custom targets to build the documentation, etc?
add_custom_target
allows you to bundle arbitrary commands into a target. In this example we use this mechanism to
create a doc
target to build the Doxygen documentation. We use
find_program to find the doxygen
executable in the system.
Note: Since the command is run in the build folder you need to copy all required input files to the build folder file(COPY)!