-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
87 lines (75 loc) · 2.72 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
CMAKE_MINIMUM_REQUIRED(VERSION 3.9)
PROJECT(PROJECT CXX)
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release)
ENDIF()
find_package(OpenMP REQUIRED)
ADD_SUBDIRECTORY(deps/vecmath)
SET(RAY_TRACING_SOURCES
src/ball.cpp
src/camera.cpp
src/christoffel.cpp
src/ray.cpp
src/geometry.cpp
src/group.cpp
src/hit.cpp
src/image.cpp
src/metric.cpp
src/object.cpp
src/observer.cpp
src/plane.cpp
src/scene.cpp
src/texture.cpp
src/trajectory.cpp
src/utils.cpp
)
SET(RAY_TRACING_INCLUDES
include/ball.hpp
include/camera.hpp
include/christoffel.hpp
include/ray.hpp
include/geometry.hpp
include/group.hpp
include/hit.hpp
include/image.hpp
include/metric.hpp
include/object.hpp
include/observer.hpp
include/plane.hpp
include/scene.hpp
include/texture.hpp
include/trajectory.hpp
include/utils.hpp
)
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
SET(TEST_SCMETRIC_DG_SOURCES ${RAY_TRACING_SOURCES}
executable_src/test_scmetric_dg.cpp)
ADD_EXECUTABLE(TEST_SCMETRIC_DG ${TEST_SCMETRIC_DG_SOURCES} ${RAY_TRACING_INCLUDES})
TARGET_LINK_LIBRARIES(TEST_SCMETRIC_DG vecmath OpenMP::OpenMP_CXX)
TARGET_INCLUDE_DIRECTORIES(TEST_SCMETRIC_DG PRIVATE include)
SET(TEST_SC_GEOMETRY_SOURCES ${RAY_TRACING_SOURCES}
executable_src/test_sc_geometry.cpp)
ADD_EXECUTABLE(TEST_SC_GEOMETRY ${TEST_SC_GEOMETRY_SOURCES} ${RAY_TRACING_INCLUDES})
TARGET_LINK_LIBRARIES(TEST_SC_GEOMETRY vecmath OpenMP::OpenMP_CXX)
TARGET_INCLUDE_DIRECTORIES(TEST_SC_GEOMETRY PRIVATE include)
SET(TEST_CAMERA_SOURCES ${RAY_TRACING_SOURCES}
executable_src/test_camera.cpp)
ADD_EXECUTABLE(TEST_CAMERA ${TEST_CAMERA_SOURCES} ${RAY_TRACING_INCLUDES})
TARGET_LINK_LIBRARIES(TEST_CAMERA vecmath OpenMP::OpenMP_CXX)
TARGET_INCLUDE_DIRECTORIES(TEST_CAMERA PRIVATE include)
SET(DEMO1_SOURCES ${RAY_TRACING_SOURCES}
executable_src/demo1.cpp)
ADD_EXECUTABLE(DEMO1 ${DEMO1_SOURCES} ${RAY_TRACING_INCLUDES})
TARGET_LINK_LIBRARIES(DEMO1 vecmath OpenMP::OpenMP_CXX)
TARGET_INCLUDE_DIRECTORIES(DEMO1 PRIVATE include)
SET(DEMO2_SOURCES ${RAY_TRACING_SOURCES}
executable_src/demo2.cpp)
ADD_EXECUTABLE(DEMO2 ${DEMO2_SOURCES} ${RAY_TRACING_INCLUDES})
TARGET_LINK_LIBRARIES(DEMO2 vecmath OpenMP::OpenMP_CXX)
TARGET_INCLUDE_DIRECTORIES(DEMO2 PRIVATE include)
SET(DEMO3_SOURCES ${RAY_TRACING_SOURCES}
executable_src/demo3.cpp)
ADD_EXECUTABLE(DEMO3 ${DEMO3_SOURCES} ${RAY_TRACING_INCLUDES})
TARGET_LINK_LIBRARIES(DEMO3 vecmath OpenMP::OpenMP_CXX)
TARGET_INCLUDE_DIRECTORIES(DEMO3 PRIVATE include)