diff options
author | Danny Holman <dholman@gymli.org> | 2024-10-18 14:42:13 -0500 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2024-10-18 14:42:13 -0500 |
commit | 28e27060274591fe13d5a1a226216fb01141e2f7 (patch) | |
tree | 72110e56a4e12a01129fe045227b9e0b5bfa6a28 /CMake | |
parent | ui: input: use scancodes instead of keycodes (diff) | |
download | rune-engine-28e27060274591fe13d5a1a226216fb01141e2f7.tar.gz rune-engine-28e27060274591fe13d5a1a226216fb01141e2f7.tar.zst rune-engine-28e27060274591fe13d5a1a226216fb01141e2f7.zip |
doc: hook documentation into build system
Add a target to the build system that will generate the included
documentation. This target should be called "docs" and should only be
called explictity, not during the default build target.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to '')
-rw-r--r-- | CMake/FindSphinx.cmake | 8 | ||||
-rw-r--r-- | CMakeLists.txt | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/CMake/FindSphinx.cmake b/CMake/FindSphinx.cmake new file mode 100644 index 0000000..237d026 --- /dev/null +++ b/CMake/FindSphinx.cmake @@ -0,0 +1,8 @@ +find_program(SPHINX_EXECUTABLE + NAMES sphinx-build + DOC "Path to sphinx-build executable") +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(Sphinx + "Failed to find sphinx-build executable" + SPHINX_EXECUTABLE) diff --git a/CMakeLists.txt b/CMakeLists.txt index dda668d..ed4e53c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,13 @@ cmake_minimum_required(VERSION 3.20) +project(rune-engine VERSION 0.61.0 DESCRIPTION "High performance game engine designed for Quake-style shooters") +set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH}) set(CMAKE_C_STANDARD 23) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS ON) set(CMAKE_C_VISIBILITY_PRESET hidden) set(CMAKE_VISIBILITY_INLINES_HIDDEN YES) -project(rune-engine VERSION 0.61.0 DESCRIPTION "High performance game engine designed for Quake-style shooters") - list(APPEND SOURCE_FILES core/abort.c core/alloc.c @@ -36,6 +36,8 @@ target_include_directories(${PROJECT_NAME} PUBLIC ${HEADER_DIR}) set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION}) set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR}) +add_subdirectory("doc") + include(GNUInstallDirs) install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |