Skip to content

Commit 3f25aca

Browse files
docs: various updates (#79)
1 parent 3d584f0 commit 3f25aca

15 files changed

+75
-256
lines changed

.codeql-prebuild-cpp-Linux.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ sudo rm -rf /var/lib/apt/lists/*
2020

2121
# build
2222
mkdir -p build
23-
cd build || exit 1
2423
cmake \
2524
-DBUILD_DOCS=OFF \
26-
-G Ninja ..
27-
ninja
25+
-B build \
26+
-G Ninja \
27+
-S .
28+
ninja -C build
2829

2930
# skip autobuild
3031
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"

.codeql-prebuild-cpp-Windows.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ pacman --noconfirm -S \
1515

1616
# build
1717
mkdir -p build
18-
cd build || exit 1
1918
cmake \
2019
-DBUILD_DOCS=OFF \
21-
-G Ninja ..
22-
ninja
20+
-B build \
21+
-G Ninja \
22+
-S .
23+
ninja -C build
2324

2425
# skip autobuild
2526
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"

.codeql-prebuild-cpp-macOS.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ brew install \
1010

1111
# build
1212
mkdir -p build
13-
cd build || exit 1
1413
cmake \
1514
-DBUILD_DOCS=OFF \
16-
-G Ninja ..
17-
ninja
15+
-B build \
16+
-G Ninja \
17+
-S .
18+
ninja -C build
1819

1920
# skip autobuild
2021
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"

.github/workflows/ci.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,20 @@ jobs:
6363
sudo apt-get install -y \
6464
build-essential \
6565
cmake \
66-
doxygen \
67-
graphviz \
6866
ninja-build \
6967
nlohmann-json3-dev
7068
7169
- name: Setup Dependencies macOS
7270
if: runner.os == 'macOS'
7371
run: |
7472
brew install \
73+
boost \
7574
cmake \
7675
doxygen \
7776
graphviz \
77+
nlohmann-json \
7878
ninja \
79-
boost \
80-
nlohmann-json
79+
node \
8180
8281
- name: Setup Dependencies Windows
8382
if: runner.os == 'Windows'
@@ -91,6 +90,7 @@ jobs:
9190
mingw-w64-ucrt-x86_64-cmake
9291
mingw-w64-ucrt-x86_64-graphviz
9392
mingw-w64-ucrt-x86_64-ninja
93+
mingw-w64-ucrt-x86_64-nodejs
9494
mingw-w64-ucrt-x86_64-toolchain
9595
mingw-w64-ucrt-x86_64-boost
9696
mingw-w64-ucrt-x86_64-nlohmann-json
@@ -177,18 +177,27 @@ jobs:
177177
COMMIT: ${{ needs.setup_release.outputs.release_commit }}
178178
run: |
179179
mkdir -p build
180-
cd build
180+
181+
if [ "${{ runner.os }}" = "Linux" ]; then
182+
# Doxygen from Ubuntu is too old, need Doxygen >= 1.10
183+
DOCS=OFF
184+
else
185+
DOCS=ON
186+
fi
187+
181188
cmake \
189+
-DBUILD_DOCS=${DOCS} \
182190
-DCMAKE_BUILD_TYPE:STRING=Debug \
191+
-B build \
183192
-G Ninja \
184-
..
185-
ninja
193+
-S .
194+
ninja -C build
186195
187196
- name: Run tests
188197
id: test
189-
working-directory: build
198+
working-directory: build/tests
190199
run: |
191-
./tests/test_libdisplaydevice --gtest_color=yes
200+
./test_libdisplaydevice --gtest_color=yes
192201
193202
- name: Generate gcov report
194203
# any except canceled or skipped

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,8 @@
4141
build/
4242
cmake-*/
4343

44+
# doxyconfig
45+
docs/*-doxyconfig*
46+
4447
# CTest
4548
Testing/

.gitmodules

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
[submodule "third-party/doxygen-awesome-css"]
2-
path = third-party/doxygen-awesome-css
3-
url = https://github.com/jothepro/doxygen-awesome-css.git
4-
branch = main
1+
[submodule "third-party/doxyconfig"]
2+
path = third-party/doxyconfig
3+
url = https://github.com/LizardByte/doxyconfig.git
4+
branch = master
55
[submodule "third-party/googletest"]
66
path = third-party/googletest
77
url = https://github.com/google/googletest.git

.readthedocs.yaml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,37 @@
33
# Read the Docs configuration file
44
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
55

6-
# Required
76
version: 2
87

9-
# Set the version of Python
108
build:
119
os: ubuntu-24.04
1210
tools:
1311
python: "miniconda-latest"
1412
commands:
1513
# because we are overriding the build commands, we need to setup the environment ourselves
16-
- cat docs/environment.yml
17-
- conda env create --quiet --name $READTHEDOCS_VERSION --file docs/environment.yml
18-
- cmake -B build -S .
19-
- cmake --build build --target docs
14+
- cat third-party/doxyconfig/environment.yml
15+
- conda env create --quiet --name ${READTHEDOCS_VERSION} --file third-party/doxyconfig/environment.yml
16+
- npm install "@fortawesome/fontawesome-free"
17+
- mkdir -p ${READTHEDOCS_OUTPUT}html/assets/fontawesome/css
18+
- mkdir -p ${READTHEDOCS_OUTPUT}html/assets/fontawesome/js
19+
- cp node_modules/@fortawesome/fontawesome-free/css/all.min.css ${READTHEDOCS_OUTPUT}html/assets/fontawesome/css
20+
- cp node_modules/@fortawesome/fontawesome-free/js/all.min.js ${READTHEDOCS_OUTPUT}html/assets/fontawesome/js
21+
- cp -r node_modules/@fortawesome/fontawesome-free/webfonts ${READTHEDOCS_OUTPUT}html/assets/fontawesome/
22+
- |
23+
wget "https://raw.githubusercontent.com/LizardByte/.github/master/branding/logos/favicon.ico" \
24+
-O ${READTHEDOCS_OUTPUT}lizardbyte.ico
25+
- |
26+
wget "https://raw.githubusercontent.com/LizardByte/.github/master/branding/logos/logo-128x128.png" \
27+
-O ${READTHEDOCS_OUTPUT}lizardbyte.png
28+
- cp ./third-party/doxyconfig/Doxyfile ./docs/Doxyfile-doxyconfig
29+
- cp ./third-party/doxyconfig/header.html ./docs/header-doxyconfig.html
30+
- cat ./docs/Doxyfile >> ./docs/Doxyfile-doxyconfig
31+
- cd docs && doxygen Doxyfile-doxyconfig
2032

2133
# using conda, we can get newer doxygen and graphviz than ubuntu provide
2234
# https://github.com/readthedocs/readthedocs.org/issues/8151#issuecomment-890359661
2335
conda:
24-
environment: docs/environment.yml
36+
environment: third-party/doxyconfig/environment.yml
2537

2638
submodules:
2739
include: all

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
1616
endif()
1717

1818
# Add our custom CMake modules to the global path
19-
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
19+
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
2020

2121
#
2222
# Project optional configuration
@@ -28,7 +28,7 @@ option(BUILD_TESTS "Build tests" ON)
2828
# Documentation
2929
#
3030
if(BUILD_DOCS)
31-
add_subdirectory(docs)
31+
add_subdirectory(third-party/doxyconfig docs)
3232
endif()
3333

3434
#

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ Ensure [git](https://git-scm.com/) is installed and run the following:
2323
```bash
2424
git clone https://github.com/lizardbyte/libdisplaydevice.git --recurse-submodules
2525
cd libdisplaydevice
26-
mkdir build
27-
cd build
26+
mkdir -p build
2827
```
2928

3029
### Windows
@@ -54,18 +53,17 @@ pacman -S \
5453

5554
### Build
5655

57-
> [!WARNING]
58-
> Ensure you are in the build directory created during the clone step earlier before continuing.
56+
@warning{Ensure you are in the build directory created during the clone step earlier before continuing.}
5957

6058
```bash
61-
cmake -G Ninja ..
62-
ninja
59+
cmake -G Ninja -B build -S .
60+
ninja -C build
6361
```
6462

6563
### Test
6664

6765
```bash
68-
tests\test_libdisplaydevice
66+
./build/tests/test_libdisplaydevice
6967
```
7068

7169
## Support

docs/CMakeLists.txt

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)