diff --git a/CHANGELOG.md b/CHANGELOG.md index 07df030e064..0a5d65fa27b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unversioned +- Dev: Add doxygen build target. (#5377) + ## 2.5.1 - Bugfix: Fixed links without a protocol not being clickable. (#5345) diff --git a/CMakeLists.txt b/CMakeLists.txt index fdcb7075b9f..eec6b7e1c8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -197,6 +197,7 @@ find_package(PajladaSerialize REQUIRED) find_package(PajladaSignals REQUIRED) find_package(LRUCache REQUIRED) find_package(MagicEnum REQUIRED) +find_package(Doxygen) if (USE_SYSTEM_PAJLADA_SETTINGS) find_package(PajladaSettings REQUIRED) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index eb64bcf31f0..301808906cb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1141,3 +1141,14 @@ if(NOT CHATTERINO_UPDATER) message(STATUS "Disabling the updater.") target_compile_definitions(${LIBRARY_PROJECT} PUBLIC CHATTERINO_DISABLE_UPDATER) endif() + +if (DOXYGEN_FOUND) + message(STATUS "Doxygen found, adding doxygen target") + # output will be in docs/html + set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/docs") + + doxygen_add_docs( + doxygen + ${CMAKE_CURRENT_LIST_DIR} + ) +endif ()