docs: Improve error messages around Doxygen

This commit is contained in:
Nick Bolton
2024-10-31 11:58:44 +00:00
parent 232e8fafee
commit da64ca577c

View File

@ -2,9 +2,10 @@
# SPDX-License-Identifier: MIT
find_package(Doxygen QUIET)
option(BUILD_DOCS "Build and Install Documents" ${DOXYGEN_FOUND})
option(BUILD_DOCS "Build and install documents" ${DOXYGEN_FOUND})
if (BUILD_DOCS AND DOXYGEN_FOUND)
if(BUILD_DOCS)
set(DOXYGEN_EXTRACT_ALL YES)
set(DOXYGEN_STRIP_FROM_PATH ${CMAKE_SOURCE_DIR})
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE mainpage.md)
@ -12,7 +13,7 @@ if(BUILD_DOCS)
# 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)
doxygen_add_docs(user-docs ${CMAKE_SOURCE_DIR}/doc COMMENT "Generating user documentation" ALL)
# HACK Only these will show in your IDE
target_sources(user-docs PRIVATE
@ -24,6 +25,7 @@ if(BUILD_DOCS)
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")
else()
message(STATUS "Doxygen not found, skipping docs build")
endif()