-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
47 lines (36 loc) · 923 Bytes
/
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
cmake_minimum_required(VERSION 3.14)
project(
engine
VERSION 0.1.0
DESCRIPTION "Engine"
HOMEPAGE_URL "https://korigamik.ml/engine"
LANGUAGES CXX
)
add_subdirectory(core)
enable_testing()
set(BUILD_TESTING ON CACHE BOOL "Build tests")
if (BUILD_TESTING)
add_subdirectory(sample)
endif()
add_custom_target(
check
COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure
DEPENDS test
)
set(GENERATE_DOXYFILE OFF CACHE BOOL "Generate documentation")
if(NOT Emscripten AND GENERATE_DOXYFILE)
find_package(Doxygen REQUIRED)
set(DOXYGEN_GENERATE_HTML YES)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile.in # input
${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile # output
@ONLY
)
endif()
add_custom_target(
doc
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/docs
COMMENT "Generating API documentation with Doxygen"
VERBATIM
)