File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -105,10 +105,6 @@ jobs:
105
105
- name : Checkout repository
106
106
uses : actions/checkout@v3.5.3
107
107
108
- - name : Install requirements
109
- run : |
110
- sudo apt-get install -y doxygen
111
-
112
108
- name : Configure and build documentation
113
109
uses : threeal/cmake-action@v1.2.0
114
110
with :
Original file line number Diff line number Diff line change 1
- # A function that generates XML documentation from the specified target.
1
+ # A function that generates XML documentation for the specified target.
2
2
function (target_generate_xml_docs TARGET )
3
+ # Try to install Doxygen if not found
4
+ find_program (DOXYGEN_PROGRAM doxygen )
5
+ if (NOT DOXYGEN_PROGRAM )
6
+ find_program (APT_GET_PROGRAM apt-get )
7
+ if (APT_GET_PROGRAM )
8
+ message (STATUS "Doxygen could not be found, installing..." )
9
+ execute_process (COMMAND ${APT_GET_PROGRAM} install -y doxygen )
10
+ endif ()
11
+
12
+ find_program (BREW_PROGRAM brew )
13
+ if (BREW_PROGRAM )
14
+ message (STATUS "Doxygen could not be found, installing..." )
15
+ execute_process (COMMAND ${BREW_PROGRAM} install doxygen )
16
+ endif ()
17
+ endif ()
18
+
3
19
# Try to find Doxygen
4
20
find_package (Doxygen )
5
21
if (DOXYGEN_FOUND )
@@ -25,7 +41,5 @@ function(target_generate_xml_docs TARGET)
25
41
# Generate XML documentation for the target
26
42
doxygen_add_docs (${TARGET} _docs ${HEADER_FILES} USE_STAMP_FILE )
27
43
add_dependencies (${TARGET} ${TARGET} _docs )
28
- else ()
29
- message (WARNING "Could not found Doxygen!" )
30
44
endif ()
31
45
endfunction ()
You can’t perform that action at this time.
0 commit comments