docs: cmake to generate doxygen
This commit is contained in:
@ -80,11 +80,16 @@ include(cmake/Build.cmake)
|
||||
include(cmake/Libraries.cmake)
|
||||
include(cmake/Packaging.cmake)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
configure_definitions()
|
||||
configure_build()
|
||||
configure_libs()
|
||||
configure_packaging()
|
||||
|
||||
option(BUILD_DOCS "Build documentation" ON)
|
||||
add_subdirectory(doc)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
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()
|
||||
Reference in New Issue
Block a user