[CMake] installing generated files
Brandon Van Every
bvanevery at gmail.com
Wed Nov 28 04:38:20 EST 2007
You need to know the names of the files that will be generated and
then INSTALL(FILES ...)
Typically I just have a hardwired list of root words, from which I
derive .cxx .hxx and whatever a doxygen suffix is. Here are some
helper routines. You're probably also going to want an
ADD_CUSTOM_COMMAND so you can specify file outputs, rather than having
to always run doxygen.
MACRO(ADD_SUFFIX rootlist suffix)
SET(outlist)
FOREACH(root ${${rootlist}})
LIST(APPEND outlist ${root}${suffix})
ENDFOREACH(root)
SET(${rootlist} ${outlist})
ENDMACRO(ADD_SUFFIX)
MACRO(ADD_PREFIX prefix rootlist)
SET(outlist)
FOREACH(root ${${rootlist}})
LIST(APPEND outlist ${prefix}${root})
ENDFOREACH(root)
SET(${rootlist} ${outlist})
ENDMACRO(ADD_PREFIX)
Cheers,
Brandon Van Every
On Nov 28, 2007 1:25 AM, Stefan Kögl <skoegl at online.de> wrote:
> Hi,
>
> how to install files generated by custom targets, eg. doxygen? The files are
> generated in ${DOXYGEN_BINARY_DIR}/html ( <projectname>/doc/html ).
>
> here is the <projectname>/doc/CMakeLists.txt
> ##############################################
>
> PROJECT(doxygen)
> FIND_PACKAGE(Doxygen REQUIRED)
>
> CONFIGURE_FILE(${doxygen_SOURCE_DIR}/Doxyfile.in
> ${doxygen_BINARY_DIR}/Doxyfile)
>
> FILE(MAKE_DIRECTORY ${doxygen_BINARY_DIR}/html)
> ADD_CUSTOM_TARGET(docs-doxygen COMMAND ${DOXYGEN_EXECUTABLE}
> ${doxygen_BINARY_DIR}/Doxyfile VERBATIM)
> INSTALL(DIRECTORY ${doxygen_BINARY_DIR}/html DESTINATION ${PERTUBIS_DOC_PATH})
>
> ##############################################
>
> Stefan Kögl
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
More information about the CMake
mailing list