-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
68 lines (37 loc) · 1.32 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
66
67
68
# Copyright (c) 2023 Sapphire's Suite. All Rights Reserved.
cmake_minimum_required(VERSION 3.16)
# Sapphire Suite's CMake tools.
add_subdirectory(ThirdParty/SA/CMake)
# Project
project(SA_Maths)
SA_ConfigureProject(SA_Maths)
# Library
add_library(SA_Maths STATIC)
SA_ConfigureTarget(SA_Maths)
SA_TargetSources(SA_Maths)
### Temp required to fix MSVC C4201 in Rectangle2D.hpp
target_link_libraries(SA_Maths PUBLIC SA_Support)
# Option
## Add SA_Maths's use SA_Logger.
option(SA_MATHS_USE_LOGGER_OPT "Should compile and use SA_Logger" OFF)
if(SA_MATHS_USE_LOGGER_OPT)
target_link_libraries(SA_Maths PUBLIC SA_Logger)
endif()
## Add SA_Maths's intrinsics implementation.
option(SA_MATHS_INTRINSICS_OPT "Should build using intrinsics" OFF)
if(SA_MATHS_INTRINSICS_OPT)
#target_link_libraries(SA_Maths PUBLIC SA_Support)
target_compile_definitions(SA_Maths PUBLIC SA_MATHS_INTRINSICS_OPT)
SA_SetIntrinsicsFlags(SA_Maths)
endif()
## Add SA_Maths's tests to build tree.
option(SA_MATHS_BUILD_TESTS_OPT "Should build SA_Maths tests" OFF)
## Add SA_Maths's benchmark to build tree.
option(SA_MATHS_BUILD_BENCHMARK_OPT "Should build SA_Maths benchmark" OFF)
# Entrypoints
add_subdirectory(ThirdParty)
if(SA_MATHS_BUILD_TESTS_OPT)
### Enable testing for this directory and below.
enable_testing()
add_subdirectory(Tests)
endif()