-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
65 lines (49 loc) · 1.12 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#
# XECS
#
cmake_minimum_required(VERSION 3.15)
#
# Project Configuration
#
include(cmake/PreventInSourceBuilds.cmake)
project(
XECS
VERSION 1.0.0
DESCRIPTION "Fast entity-component-system (ECS) with compile-time archetypes"
HOMEPAGE_URL "https://github.com/MathieuDonofrio/xecs"
LANGUAGES CXX
)
include(cmake/CompilerOptions.cmake)
#
# Target
#
add_library(XECS INTERFACE)
target_include_directories(XECS INTERFACE ${XECS_SOURCE_DIR}/src)
target_compile_features(XECS INTERFACE cxx_std_17)
#
# Tests
#
option(XECS_BUILD_TESTING "Enable building with tests" OFF)
if(XECS_BUILD_TESTING)
include(CTest)
enable_testing()
add_subdirectory(test)
endif()
#
# Benchmarks
#
option(XECS_BUILD_BENCHMARKING "Enable building with benchmarks" OFF)
if(XECS_BUILD_BENCHMARKING)
add_subdirectory(bench)
endif()
#
# Documentation
#
option(XECS_BUILD_DOCUMENTATION "Enable doxygen doc builds of source" OFF)
if(XECS_BUILD_DOCUMENTATION)
set(DOXYGEN_CALLER_GRAPH YES)
set(DOXYGEN_CALL_GRAPH YES)
set(DOXYGEN_EXTRACT_ALL YES)
find_package(Doxygen REQUIRED dot)
doxygen_add_docs(doxygen-docs ${XECS_SOURCE_DIR}/src)
endif()