File tree Expand file tree Collapse file tree 4 files changed +30
-4
lines changed
Expand file tree Collapse file tree 4 files changed +30
-4
lines changed Original file line number Diff line number Diff line change @@ -578,6 +578,7 @@ endif()
578578set (CMAKE_SKIP_BUILD_RPATH TRUE )
579579set (CMAKE_SKIP_INSTALL_RPATH TRUE )
580580add_subdirectory (test )
581+ add_subdirectory (doc )
581582
582583include (cmake/crc32c.cmake)
583584include (cmake/leveldb.cmake)
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2024-present The Bitcoin Core developers
2+ # Distributed under the MIT software license, see the accompanying
3+ # file COPYING or https://opensource.org/license/mit/.
4+
5+ find_package (Doxygen COMPONENTS dot)
6+
7+ if (DOXYGEN_FOUND)
8+ set (doxyfile ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile)
9+ configure_file (Doxyfile.in ${doxyfile} )
10+
11+ # In CMake 3.27, The FindDoxygen module's doxygen_add_docs()
12+ # command gained a CONFIG_FILE option to specify a custom doxygen
13+ # configuration file.
14+ # TODO: Consider using it.
15+ add_custom_target (docs
16+ COMMAND Doxygen::doxygen ${doxyfile}
17+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
18+ COMMENT "Generating developer documentation"
19+ VERBATIM USES_TERMINAL
20+ )
21+ else ()
22+ add_custom_target (docs
23+ COMMAND ${CMAKE_COMMAND} -E echo "Error: Doxygen not found"
24+ )
25+ endif ()
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ PROJECT_LOGO = doc/bitcoin_logo_doxygen.png
5858# entered, it will be relative to the location where doxygen was started. If
5959# left blank the current directory will be used.
6060
61- OUTPUT_DIRECTORY = doc/doxygen
61+ OUTPUT_DIRECTORY = @PROJECT_BINARY_DIR@/ doc/doxygen
6262
6363# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
6464# directories (in 2 levels) under the output directory of each output format and
Original file line number Diff line number Diff line change @@ -338,11 +338,11 @@ Recommendations:
338338
339339### Generating Documentation
340340
341- The documentation can be generated with ` make docs ` and cleaned up with `make
342- clean-docs ` . The resulting files are located in ` doc/doxygen/html`; open
341+ The documentation can be generated with ` cmake --build <build_dir> --target docs ` .
342+ The resulting files are located in ` <build_dir>/ doc/doxygen/html` ; open
343343` index.html ` in that directory to view the homepage.
344344
345- Before running ` make docs` , you'll need to install these dependencies:
345+ Before building the ` docs ` target , you'll need to install these dependencies:
346346
347347Linux: ` sudo apt install doxygen graphviz `
348348
You can’t perform that action at this time.
0 commit comments