1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-08-30 21:51:12 +02:00
ModernCppStarter/documentation/CMakeLists.txt
Claus Klein d81a42450c - Add CMake Workflow Presets
- Upgrade to gitup workflow action v3
- Prepare use of git-flow
- Use CMake v3.21 variable PROJECT_IS_TOP_LEVEL
- Use CMAKE_DEBUG_POSTFIX to prevent name clashes
- Add more config files
2023-07-31 07:13:34 +02:00

30 lines
1,014 B
CMake

cmake_minimum_required(VERSION 3.21...3.27)
project(GreeterDocs)
# ---- Dependencies ----
include(../cmake/CPM.cmake)
CPMAddPackage("gh:mosra/m.css#a0d292ec311b97fefd21e93cdefb60f88d19ede6")
CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
# ---- Doxygen variables ----
# set Doxyfile variables
set(DOXYGEN_PROJECT_NAME Greeter)
set(DOXYGEN_PROJECT_VERSION ${Greeter_VERSION})
set(DOXYGEN_PROJECT_ROOT "${CMAKE_CURRENT_LIST_DIR}/..")
set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doxygen")
configure_file(${CMAKE_CURRENT_LIST_DIR}/Doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${CMAKE_CURRENT_LIST_DIR}/conf.py ${CMAKE_CURRENT_BINARY_DIR}/conf.py)
add_custom_target(
GenerateDocs
${CMAKE_COMMAND} -E make_directory "${DOXYGEN_OUTPUT_DIRECTORY}"
COMMAND "${m.css_SOURCE_DIR}/documentation/doxygen.py" "${CMAKE_CURRENT_BINARY_DIR}/conf.py"
COMMAND echo "Docs written to: ${DOXYGEN_OUTPUT_DIRECTORY}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)