diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index f68aa31..00721c2 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -34,4 +34,4 @@ jobs: uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./build/doxygen/html + publish_dir: ./build/libs/greeter/docs/doxygen/html diff --git a/CMakeLists.txt b/CMakeLists.txt index b641919..4770993 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,11 +31,6 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) include(CTest) # include(CMakePrintHelpers) Docs only available if this is the main app find_package(Doxygen) - if(Doxygen_FOUND) - add_subdirectory(docs) - else() - message(STATUS "Doxygen not found, not building docs") - endif() endif() set(CMAKE_EXPORT_COMPILE_COMMANDS ON) diff --git a/libs/greeter/CMakeLists.txt b/libs/greeter/CMakeLists.txt index 112b66d..028e61c 100644 --- a/libs/greeter/CMakeLists.txt +++ b/libs/greeter/CMakeLists.txt @@ -1,5 +1,11 @@ cmake_minimum_required(VERSION 3.23 FATAL_ERROR) +if(Doxygen_FOUND) + add_subdirectory(docs) +else() + message(STATUS "Doxygen not found, not building docs") +endif() + # ---- Add source files ---- # Note: globbing sources is considered bad practice as CMake's generators may not detect new files diff --git a/libs/greeter/README.md b/libs/greeter/README.md new file mode 100644 index 0000000..7ed9976 --- /dev/null +++ b/libs/greeter/README.md @@ -0,0 +1,3 @@ +# Greeter demo library + +Greeter demo library for the modern-cpp-project diff --git a/docs/CMakeLists.txt b/libs/greeter/docs/CMakeLists.txt similarity index 83% rename from docs/CMakeLists.txt rename to libs/greeter/docs/CMakeLists.txt index 7651c34..973a169 100644 --- a/docs/CMakeLists.txt +++ b/libs/greeter/docs/CMakeLists.txt @@ -3,11 +3,7 @@ cmake_minimum_required(VERSION 3.23 FATAL_ERROR) # project(GreeterDocs) # ---- Dependencies ---- - -include(../cmake/CPM.cmake) - -CPMAddPackage("gh:mosra/m.css#42d4a9a48f31f5df6e246c948403b54b50574a2a") -# CPMAddPackage(NAME greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..) +CPMAddPackage("gh:mosra/m.css#a0d292ec311b97fefd21e93cdefb60f88d19ede6") # ---- Doxygen variables ---- diff --git a/docs/Doxyfile b/libs/greeter/docs/Doxyfile similarity index 100% rename from docs/Doxyfile rename to libs/greeter/docs/Doxyfile diff --git a/docs/conf.py b/libs/greeter/docs/conf.py similarity index 78% rename from docs/conf.py rename to libs/greeter/docs/conf.py index 6cc1a04..146f629 100644 --- a/docs/conf.py +++ b/libs/greeter/docs/conf.py @@ -1,9 +1,6 @@ -DOXYFILE = 'Doxyfile' +DOXYFILE = "Doxyfile" -LINKS_NAVBAR1 = [ - (None, 'pages', [(None, 'about')]), - (None, 'namespaces', []), -] +LINKS_NAVBAR1 = [("Pages", "pages", []), ("Namespaces", "namespaces", [])] # Add your own navbar links using the code below. # To find the valid link names, you can inspect the URL of a generated documentation site. diff --git a/docs/pages/about.dox b/libs/greeter/docs/pages/about.dox similarity index 100% rename from docs/pages/about.dox rename to libs/greeter/docs/pages/about.dox