docs: Improve error messages around Doxygen
This commit is contained in:
parent
232e8fafee
commit
da64ca577c
1 changed files with 7 additions and 5 deletions
|
|
@ -2,9 +2,10 @@
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
find_package(Doxygen QUIET)
|
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_EXTRACT_ALL YES)
|
||||||
set(DOXYGEN_STRIP_FROM_PATH ${CMAKE_SOURCE_DIR})
|
set(DOXYGEN_STRIP_FROM_PATH ${CMAKE_SOURCE_DIR})
|
||||||
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE mainpage.md)
|
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE mainpage.md)
|
||||||
|
|
@ -12,7 +13,7 @@ if(BUILD_DOCS)
|
||||||
|
|
||||||
# Files used to make our documents
|
# Files used to make our documents
|
||||||
# User facing documents will not include doxy comments in source code
|
# 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
|
# HACK Only these will show in your IDE
|
||||||
target_sources(user-docs PRIVATE
|
target_sources(user-docs PRIVATE
|
||||||
|
|
@ -24,6 +25,7 @@ if(BUILD_DOCS)
|
||||||
DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html"
|
DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html"
|
||||||
DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||||
COMPONENT deskflow_docs)
|
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()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue