diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 0f2035af4..af5ef89b0 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,31 +1,19 @@ -# SPDX-FileCopyrightText: 2019 - 2024 Chris Rizzitello +# SPDX-FileCopyrightText: 2019 - 2025 Chris Rizzitello # SPDX-License-Identifier: MIT find_package(Doxygen QUIET) -option(BUILD_DOCS "Build and install documents" ${DOXYGEN_FOUND}) - -if (BUILD_DOCS AND DOXYGEN_FOUND) +option(BUILD_USER_DOCS "Build and install user documentation" ${DOXYGEN_FOUND}) +if (DOXYGEN_FOUND) + # Generic Doxygen options 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) + set(DOXYGEN_PROJECT_NAME ${CMAKE_PROJECT_PROPER_NAME}) - # 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(user-docs PRIVATE - mainpage.md - configuration.md - ) - - install( - DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html" - DESTINATION ${CMAKE_INSTALL_DOCDIR} - COMPONENT deskflow_docs) - + if (BUILD_USER_DOCS) + add_subdirectory(user) + endif() else() message(STATUS "Doxygen not found, skipping docs build") endif() diff --git a/doc/user/CMakeLists.txt b/doc/user/CMakeLists.txt new file mode 100644 index 000000000..63b10008f --- /dev/null +++ b/doc/user/CMakeLists.txt @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: 2025 Chris Rizzitello +# SPDX-License-Identifier: MIT + +set(DOXYGEN_USE_MDFILE_AS_MAINPAGE mainpage.md) + +# Files used to make our documents +# User facing documents will not include doxy comments in source code +doxygen_add_docs(user-docs ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Generating user documentation" ALL) + +# HACK Only these will show in your IDE +target_sources(user-docs PRIVATE + mainpage.md + configuration.md +) + +install( + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html" + DESTINATION ${CMAKE_INSTALL_DOCDIR} + COMPONENT deskflow_user_docs +) diff --git a/doc/configuration.md b/doc/user/configuration.md similarity index 100% rename from doc/configuration.md rename to doc/user/configuration.md diff --git a/doc/mainpage.md b/doc/user/mainpage.md similarity index 100% rename from doc/mainpage.md rename to doc/user/mainpage.md