[CMake] CMake and Doxygen documentation
Eric Noulard
eric.noulard at gmail.com
Mon Feb 5 14:04:18 EST 2007
2007/2/5, Alan W. Irwin <irwin at beluga.phys.uvic.ca>:
> On 2007-02-05 17:18+0100 Crni Gorac wrote:
>
> > Anyone having a simple example of CMake setup to support target named
> > say "docs" in CMake generated makefile so that "make docs" would
> > generate project documentation using Doxygen?
>
> Yes.
>
> Browse the subversion repository of libLASi project at
> http://lasi.svn.sourceforge.net/viewvc/lasi/trunk/. One complication is we
> generate both user and developer forms of our documentation in doc/user and
> doc/developer using doxygen, but otherwise it is about as simple as you can
> get.
>
> One nasty complication is the "INSTALL(DIRECTORY ..." pattern we use to
> install the doxygen-generated results demands that the directory doc be
> present at cmake time so the cmake command quit with an error if we
> attempted to generate the doc directory at "make" time. I am unaware of any
> way to get cmake to create a directory _at cmake time_ (if somebody knows of
> a way, please let me know!) so we ended up creating an empty subversion
> directory called doc to satisfy this need.
Won't a
FILE(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/doc)
just after your
if(DOXYGEN_EXECUTABLE AND UNIX)
do the job at CMake time?
The problem I see with your scheme is that you force
to generate files "in-source", which looks not so good to me
(I would go for ${CMAKE_BINARY_DIR}/doc)
but you must have your reason.
--
Erk
More information about the CMake
mailing list