docs: cmake to generate doxygen
This commit is contained in:
parent
f74cce32a4
commit
8b62f5b083
3 changed files with 34 additions and 2494 deletions
|
|
@ -80,11 +80,16 @@ include(cmake/Build.cmake)
|
||||||
include(cmake/Libraries.cmake)
|
include(cmake/Libraries.cmake)
|
||||||
include(cmake/Packaging.cmake)
|
include(cmake/Packaging.cmake)
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
configure_definitions()
|
configure_definitions()
|
||||||
configure_build()
|
configure_build()
|
||||||
configure_libs()
|
configure_libs()
|
||||||
configure_packaging()
|
configure_packaging()
|
||||||
|
|
||||||
|
option(BUILD_DOCS "Build documentation" ON)
|
||||||
|
add_subdirectory(doc)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
post_config_all()
|
post_config_all()
|
||||||
|
|
|
||||||
29
doc/CMakeLists.txt
Normal file
29
doc/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
# SPDX-FileCopyrightText: 2019 - 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
find_package(Doxygen QUIET)
|
||||||
|
option(DOCS "Build and Install Documents" ${DOXYGEN_FOUND})
|
||||||
|
|
||||||
|
if(DOCS)
|
||||||
|
set(DOXYGEN_EXTRACT_ALL YES)
|
||||||
|
set(DOXYGEN_STRIP_FROM_PATH ${CMAKE_SOURCE_DIR})
|
||||||
|
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE mainpage.md)
|
||||||
|
set(DOXYGEN_QUIET YES)
|
||||||
|
|
||||||
|
# Files used to make our documents
|
||||||
|
# User facing documents will not include doxy comments in source code
|
||||||
|
doxygen_add_docs(user-docs ${CMAKE_SOURCE_DIR}/doc COMMENT "Generating User Documentation" ALL)
|
||||||
|
|
||||||
|
# HACK Only these will show in your IDE
|
||||||
|
target_sources(docs PRIVATE
|
||||||
|
mainpage.md
|
||||||
|
configuration.md
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html"
|
||||||
|
DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||||
|
COMPONENT deskflow_docs)
|
||||||
|
elseif(NOT DOXYGEN_FOUND)
|
||||||
|
message(STATUS:"Unable to build documentation Doxygen not found")
|
||||||
|
endif()
|
||||||
Loading…
Reference in a new issue