1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
option(
BIOMETRYD_ENABLE_DOC_GENERATION
"Generate package documentation with doxygen"
OFF
)
if (BIOMETRYD_ENABLE_DOC_GENERATION)
# Please note that we are creating documentation within the source tree
# as we are hosting our documentation on readthedocs.org. For their build machinery to work
# properly, we need to generate doxygen XML output within the source tree.
find_package(Doxygen)
if (DOXYGEN_FOUND)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc ALL
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM)
install(
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR})
endif ()
endif ()
|