-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
49 lines (40 loc) · 1.06 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
cmake_minimum_required (VERSION 3.0)
project (type_utils)
set (CMAKE_CXX_STANDARD 23)
option(BUILD_TYPE_UTILS_EXAMPLE "Build the type utils example project." false)
option(BUILD_TYPE_UTILS_TESTS "Build the type utils tests project." false)
if (TARGET type_utils)
else()
file(GLOB_RECURSE SOURCE
"${type_utils_SOURCE_DIR}/include/*.hpp"
)
add_library(type_utils ${SOURCE})
set_target_properties(type_utils PROPERTIES LINKER_LANGUAGE CXX)
endif()
if (${BUILD_TYPE_UTILS_EXAMPLE})
if (TARGET type_utils_example)
else()
add_executable(type_utils_example
"${type_utils_SOURCE_DIR}/example.cpp"
)
target_include_directories(type_utils_example PRIVATE
${type_utils_SOURCE_DIR}/include/
)
endif()
endif()
if (${BUILD_TYPE_UTILS_TESTS})
if (TARGET type_utils_tests)
else()
file(GLOB_RECURSE TESTS_SOURCE
"${type_utils_SOURCE_DIR}/tests/*.cpp"
"${type_utils_SOURCE_DIR}/tests/*.hpp"
)
add_executable(type_utils_tests
${TESTS_SOURCE}
)
target_include_directories(type_utils_tests PRIVATE
${type_utils_SOURCE_DIR}/include/
${type_utils_SOURCE_DIR}/tests/
)
endif()
endif()