summaryrefslogtreecommitdiff
path: root/doc/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2023-04-11 22:15:36 +0200
committerAlexis Hildebrandt <afh@surryhill.net>2023-04-11 22:15:36 +0200
commit72d685a258a8632b6769f033f30ebdea84d612b2 (patch)
tree5a4d7ad2058e8c9df750741ef59a18a77aa4dd71 /doc/CMakeLists.txt
parentca375cc8af4bb9d3a870dd0ff81e9853be216c87 (diff)
parent37c9e77a121b39e3073fb89b1bb57e00232f46d8 (diff)
downloadfork-ledger-72d685a258a8632b6769f033f30ebdea84d612b2.tar.gz
fork-ledger-72d685a258a8632b6769f033f30ebdea84d612b2.tar.bz2
fork-ledger-72d685a258a8632b6769f033f30ebdea84d612b2.zip
Merge branch 'master' into pragma-once
Diffstat (limited to 'doc/CMakeLists.txt')
-rw-r--r--doc/CMakeLists.txt20
1 files changed, 14 insertions, 6 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 08132224..4fcdeb9b 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -5,10 +5,15 @@
########################################################################
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.16.2)
project(ledger NONE)
+set(DOXYGEN_EXTRA_CSS CACHE STRING
+ "Path to extra css file added to the generated API documentation")
+set(DOXYGEN_HTML_HEADER CACHE STRING
+ "Path to html file used as the generated API documentation header")
+
# Point CMake at any custom modules we may ship
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
include(LedgerVersion)
@@ -23,15 +28,18 @@ if (USE_DOXYGEN)
message(FATAL_ERROR "Could not find doxygen. Reference documentation cannot be built.")
endif()
- configure_file(Doxyfile.in Doxyfile @ONLY)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile @ONLY)
# see INPUT/FILE_PATTERNS in Doxyfile.in
- file(GLOB doxygen_input_files ${CMAKE_SOURCE_DIR}/src/*.h)
+ file(GLOB doxygen_input_files ${CMAKE_CURRENT_SOURCE_DIR}/../src/*.h)
- add_custom_command(OUTPUT html/index.html
- COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
- DEPENDS Doxyfile ${doxygen_input_files}
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html
+ COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile ${doxygen_input_files}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Building doxygen documentation")
+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
+ DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT doc)
add_custom_target(doc.doxygen DEPENDS html/index.html)
else()
add_custom_target(doc.doxygen)