doxygen fix for documentation

This commit is contained in:
Paulchen Panther 2018-12-20 14:36:13 +01:00 committed by GitHub
parent 8326c122fe
commit bb79589e3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,15 +1,21 @@
option(BUILD_HYPERION_DOC "Build hyperion documentation" OFF)
# Find doxygen # Find doxygen and check if Doxygen is installed
find_package(Doxygen QUIET) find_package(Doxygen QUIET)
# This processes our hyperion-cmake.doxyfile and subsitutes variables to generate a final hyperion.doxyfile if (BUILD_HYPERION_DOC)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/hyperion.in.doxygen ${CMAKE_CURRENT_BINARY_DIR}/hyperion.doxygen) if (DOXYGEN_FOUND)
# This processes the shell script that is used to build the documentation and check the result # set input and output files
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/hyperion-build-doc.in.sh ${CMAKE_CURRENT_BINARY_DIR}/hyperion-build-doc.sh) set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/hyperion.in.doxygen)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/hyperion.doxygen)
# request to configure the file
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
message(STATUS "Doxygen build started")
# Define all static (i.e. not generated) documentation files # Define all static (i.e. not generated) documentation files
set(StaticDocumentationFiles hyperion-header.html hyperion-footer.html hyperion-stylesheet.css) set(StaticDocumentationFileshyperion-footer.html)
# Loop over all static documentation files # Loop over all static documentation files
foreach(StaticDocumentationFile ${StaticDocumentationFiles}) foreach(StaticDocumentationFile ${StaticDocumentationFiles})
@ -17,16 +23,12 @@ foreach(StaticDocumentationFile ${StaticDocumentationFiles})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${StaticDocumentationFile} ${CMAKE_CURRENT_BINARY_DIR}/html/${StaticDocumentationFile} COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${StaticDocumentationFile} ${CMAKE_CURRENT_BINARY_DIR}/html/${StaticDocumentationFile} COPYONLY)
endforeach() endforeach()
if(DOXYGEN_FOUND) add_custom_target( doc_doxygen ALL
option(BuildDocumentationSearchEngine "Enable doxygen's search engine (requires that documentation to be installed on a php enabled web server)" OFF) COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
if(BuildDocumentationSearchEngine) WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
set(DOXYGEN_SEARCHENGINE YES) COMMENT "Generating API documentation with Doxygen"
else(BuildDocumentationSearchEngine) VERBATIM )
set(DOXYGEN_SEARCHENGINE NO)
endif(BuildDocumentationSearchEngine)
#Create a custom target to build documentation. It runs doxygen aginast the generated hyperion.doxyfile and checks its return value
add_custom_target(doc sh ${CMAKE_CURRENT_BINARY_DIR}/hyperion-build-doc.sh)
else(DOXYGEN_FOUND) else(DOXYGEN_FOUND)
message(WARNING "Doxygen not found, unable to generate documenation!") message(WARNING "Doxygen not found, unable to generate documenation!")
endif(DOXYGEN_FOUND) endif(DOXYGEN_FOUND)
endif()