Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doxygen documentation generation #33

Merged
merged 1 commit into from Oct 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions CMakeLists.txt
Expand Up @@ -28,6 +28,11 @@ option(BUILD_WITH_DB_LOGGING "Build with database logging support, link against
#
option(BUILD_WITH_TELNET_LOGGING "Build with telnet logging support, link against Qt network lib (default: on)" ON)

#
# Enable documentation generation with doxygen
#
OPTION(BUILD_WITH_DOCS "Enable documentation generation (default: off)" OFF)

#
# Helper to be able to properly install into the correct directories (esp. lib/lib64)
#
Expand Down Expand Up @@ -163,3 +168,28 @@ add_custom_target(uninstall
"${CMAKE_COMMAND}" -P
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")


#
# Documentation generations
#
IF (BUILD_WITH_DOCS)
find_package(Doxygen)
if (DOXYGEN_FOUND)
# set input and output files
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)

# request to configure the file
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
message("Doxygen build started")

# note the option ALL which allows to build the docs together with the application
add_custom_target( doc_doxygen ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM )
else (DOXYGEN_FOUND)
message(FATAL "Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)
ENDIF()
5 changes: 5 additions & 0 deletions doc/Doxyfile.in
@@ -0,0 +1,5 @@
RECURSIVE = YES
OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/doc_doxygen/
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/src/ @CMAKE_CURRENT_SOURCE_DIR@/include/ @CMAKE_CURRENT_SOURCE_DIR@/docs
WARN_IF_UNDOCUMENTED = NO
GENERATE_LATEX = NO