Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install Doxygen and Graphviz
run: sudo apt-get update && sudo apt-get install -y doxygen graphviz
- name: Install prerequisites
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build doxygen graphviz

- name: Run Doxygen
run: doxygen Doxyfile
- name: Configure CMake
run: cmake -B build -G Ninja

- name: Generate documentation
run: cmake --build build --target docs

- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: 'internals-docs'
directory: 'docs/html'
directory: 'build/docs/html'
48 changes: 48 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,60 @@
cmake_minimum_required(VERSION 3.22)
project(Azin VERSION 0.0.1 LANGUAGES CXX)

if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeCache.txt" OR
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeFiles")
message(FATAL_ERROR
"\n"
"============================================================\n"
"Azin detected a previous in-source CMake build attempt.\n"
"\n"
"Please remove the generated files from the source directory:\n"
"\n"
" rm -rf CMakeCache.txt CMakeFiles\n"
"\n"
"Then configure using:\n"
"\n"
" cmake -S . -B build\n"
" cmake --build build\n"
"\n"
"============================================================\n"
)
endif()

get_filename_component(
AZIN_SOURCE_DIR_REAL
"${CMAKE_CURRENT_SOURCE_DIR}"
REALPATH
)

get_filename_component(
AZIN_BINARY_DIR_REAL
"${CMAKE_BINARY_DIR}"
REALPATH
)

if(AZIN_SOURCE_DIR_REAL STREQUAL AZIN_BINARY_DIR_REAL)
message(FATAL_ERROR
"\n"
"============================================================\n"
"Azin does not support in-source builds.\n"
"\n"
"Remove generated files from the source directory and run:\n"
"\n"
" cmake -S . -B build\n"
" cmake --build build\n"
"\n"
"============================================================\n"
)
endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(Language)
include(ProjectOptions)
include(DetectCompiler)
include(CompilerOptions)
include(Analyzers)
include(Doxygen)

include(Dependencies)

Expand Down
Loading
Loading