@@ -49,6 +49,7 @@ This can be done in several ways:
49
49
50
50
- manually copying the files
51
51
- adding the project as a Git submodule
52
+ - downloading the project with CMake FetchContent
52
53
- adding the project as a npm/xpm dependency
53
54
- installing the theme system-wide
54
55
@@ -63,6 +64,38 @@ cd doxygen-awesome-css
63
64
git checkout v2.3.4
64
65
```
65
66
67
+ ### CMake with FetchContent
68
+
69
+ For project that build with CMake, the ` FetchContent ` module can be used to download the repository at configure-time.
70
+
71
+ Add the following snippet to your ` CMakeLists.txt `
72
+
73
+ ``` cmake
74
+ include(FetchContent)
75
+ FetchContent_Declare(
76
+ doxygen-awesome-css
77
+ URL https://github.com/jothepro/doxygen-awesome-css/archive/refs/heads/main.zip
78
+ )
79
+ FetchContent_MakeAvailable(doxygen-awesome-css)
80
+
81
+ # Save the location the files were cloned into
82
+ # This allows us to get the path to doxygen-awesome.css
83
+ FetchContent_GetProperties(doxygen-awesome-css SOURCE_DIR AWESOME_CSS_DIR)
84
+
85
+ # Generate the Doxyfile
86
+ set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in)
87
+ set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
88
+ configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)
89
+ ```
90
+
91
+ This downloads the latest main (but any other revision could be used) and unpacks in the build folder. The ` Doxyfile.in ` can reference this location in the ` HTML_EXTRA_STYLESHEET ` field
92
+
93
+ ``` text
94
+ HTML_EXTRA_STYLESHEET = @AWESOME_CSS_DIR@/doxygen-awesome.css
95
+ ```
96
+
97
+ When the configure stage of CMake is run, the ` Doxyfile.in ` is rendered to Doxyfile and Doxygen can be run as usual.
98
+
66
99
### npm/xpm dependency
67
100
68
101
In the npm ecosystem, this project can be added as a development dependency
@@ -81,8 +114,8 @@ managed project.
81
114
82
115
### System-wide
83
116
84
- You can even install the theme system-wide by running ` make install ` .
85
- The files will be installed to ` /usr/local/share/ ` by default,
117
+ You can even install the theme system-wide by running ` make install ` .
118
+ The files will be installed to ` /usr/local/share/ ` by default,
86
119
but you can customize the install location with ` make PREFIX=/my/custom/path install ` .
87
120
88
121
### Choosing a layout
@@ -94,7 +127,7 @@ There are two layout options. Choose one of them and configure Doxygen according
94
127
- <b class =" tab-title " >Base Theme</b ><div class =" darkmode_inverted_image " >
95
128
![ ] ( img/theme-variants-base.drawio.svg )
96
129
</div >
97
- Comes with the typical Doxygen titlebar. Optionally the treeview in the sidebar can be enabled.
130
+ Comes with the typical Doxygen titlebar. Optionally the treeview in the sidebar can be enabled.
98
131
99
132
Required files: ` doxygen-awesome.css `
100
133
0 commit comments