-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
68 lines (53 loc) · 1.17 KB
/
Copy pathCMakeLists.txt
File metadata and controls
68 lines (53 loc) · 1.17 KB
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
66
67
68
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
project(glmm)
option(GLMM_BUILD_TESTS OFF)
set(
_include_list
"include/glmm/glmm.h"
"include/glmm/plat.h"
"include/glmm/const.h"
"include/glmm/func.h"
"include/glmm/vec.h"
"include/glmm/vec.inl.h"
"include/glmm/mat.h"
"include/glmm/quat.h"
)
set(
_source_list
"src/glmm.c"
)
add_executable(
glmm_build
${_include_list}
${_source_list}
)
target_include_directories(
glmm_build
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
)
install(FILES ${GLMM_INCLUDE} DESTINATION include/glmm)
if(GLMM_BUILD_TESTS)
find_package(Check)
enable_testing()
include_directories(${CHECK_INCLUDE_DIR})
add_executable(
vec_test
tests/vec_test.c
)
target_link_libraries(vec_test ${CHECK_LIBRARY})
add_executable(
quat_test
tests/quat_test.c
)
target_link_libraries(quat_test ${CHECK_LIBRARY})
add_test("Vec" vec_test)
add_test("Quat" quat_test)
endif()
add_library(glmm INTERFACE)
target_include_directories(
glmm
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/include
)