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 @@ -543,6 +543,7 @@ endif()
543
543
544
544
add_subdirectory (src )
545
545
add_subdirectory (test )
546
+ add_subdirectory (doc )
546
547
547
548
include (cmake/tests.cmake )
548
549
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
58
58
# entered, it will be relative to the location where doxygen was started. If
59
59
# left blank the current directory will be used.
60
60
61
- OUTPUT_DIRECTORY = doc/doxygen
61
+ OUTPUT_DIRECTORY = @PROJECT_BINARY_DIR@/ doc/doxygen
62
62
63
63
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
64
64
# directories (in 2 levels) under the output directory of each output format and
Original file line number Diff line number Diff line change @@ -339,11 +339,11 @@ Recommendations:
339
339
340
340
### Generating Documentation
341
341
342
- The documentation can be generated with ` make docs ` and cleaned up with `make
343
- clean-docs ` . The resulting files are located in ` doc/doxygen/html`; open
342
+ The documentation can be generated with ` cmake --build <build_dir> --target docs ` .
343
+ The resulting files are located in ` <build_dir>/ doc/doxygen/html` ; open
344
344
` index.html ` in that directory to view the homepage.
345
345
346
- Before running ` make docs` , you'll need to install these dependencies:
346
+ Before building the ` docs ` target , you'll need to install these dependencies:
347
347
348
348
Linux: ` sudo apt install doxygen graphviz `
349
349
You can’t perform that action at this time.
0 commit comments