summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CMake/FindSphinx.cmake8
-rw-r--r--CMakeLists.txt6
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}