[CMake] Doxygen in out of source build refuses to work

Brad King brad.king at kitware.com
Mon Nov 15 07:14:38 EST 2004


Jorg CMake wrote:
> Hi guys,
> 
> I have added an option to create doxygen documentation or not. But when
> I choose out of source build as my build env, I cannot execute the
> following command:
> 
> "C:\Program Files\doxygen\bin\doxygen.exe"
> "D:/Projects/Work/treemultictrl/docs/Doxyfile"
> 
> My guess is that the Doxyfile itself cannot find some of the files,
> although I expected it to be smart enough to switch to that dir first
> (pointed out by where the doxyfile is) and generate the documentation
> there.
> 
> However, it seems that is not possible. How do I go about and make my
> documentation in the out of source document tree? Do I need to copy the
> files manually, and if zso, does someone have an example of how to do
> that ?

Rename it to Doxyfile.in and use this command to move it to the build tree:

CONFIGURE_FILE(${TREEMULTICTRL_SOURCE_DIR}/docs/Doxyfile.in
                ${TREEMULTICTRL_BINARY_DIR}/docs/Doxyfile
                @ONLY IMMEDIATE)

This even lets you configure the file to be specific to the current 
source/build tree locations.  You can reference cmake variables using 
@VAR@ syntax in the .in file.

Then specify it as in the build tree for the custom command.

-Brad


More information about the CMake mailing list