-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
116 lines (101 loc) · 2.88 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
cmake_minimum_required(VERSION 3.10)
project(Haruno)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic")
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
find_package(Threads)
set(PROJECT_CODE
include/Types.hpp
include/Color.hpp
include/Ray.hpp
include/Camera.hpp
include/Object.hpp
include/Sphere.hpp
include/Rectangle.hpp
include/Triangle.hpp
include/TriangleMesh.hpp
include/Material.hpp
include/DiffuseMaterial.hpp
include/MirrorMaterial.hpp
include/Environment.hpp
include/Light.hpp
include/DirectionalLight.hpp
include/PointLight.hpp
include/BRDF.hpp
include/LambertBRDF.hpp
include/SpecularBRDF.hpp
include/ThreadPool.hpp
include/BaseTexture.hpp
include/SolidTexture.hpp
include/ImageTexture.hpp
include/CheckerboardTexture.hpp
include/Stopwatch.hpp
include/Vector2.hpp
include/Vector3.hpp
include/Vector4.hpp
include/Matrix4.hpp
include/AreaLight.hpp
include/Cylinder.hpp
include/Cone.hpp
include/Paraboloid.hpp
include/ToneMapper.hpp
include/ExposureMapper.hpp src/ExposureMapper.cpp
include/ReinhardMapper.hpp src/ReinhardMapper.cpp
include/Integrator.hpp src/Integrator.cpp
include/PathTracer.hpp src/PathTracer.cpp
include/RandomWalk.hpp src/RandomWalk.cpp
include/DirectLighting.hpp src/DirectLighting.cpp
include/DebugIntegrator.hpp src/DebugIntegrator.cpp
include/AmbientOcclusion.hpp src/AmbientOcclusion.cpp
include/Transformation.hpp src/Transformation.cpp
include/Image.hpp src/Image.cpp
include/ImageTile.hpp src/ImageTile.cpp
include/RNG.hpp src/RNG.cpp
include/Renderer.hpp src/Renderer.cpp
include/RenderTileTask.hpp src/RenderTileTask.cpp
include/Scene.hpp src/Scene.cpp
include/SimpleEnvironment.hpp src/SimpleEnvironment.cpp
include/TextureEnvironment.hpp src/TextureEnvironment.cpp
include/PinholeCamera.hpp src/PinholeCamera.cpp
include/SimpleCamera.hpp src/SimpleCamera.cpp
include/Math.hpp src/Math.cpp
include/ObjLoader.hpp src/ObjLoader.cpp
include/BoundingBox.hpp src/BoundingBox.cpp
)
set(TEST_SOURCES
tests/ImageTest.cpp
tests/Vector3Test.cpp
tests/Vector4Test.cpp
tests/Matrix4Test.cpp
tests/RayTest.cpp
tests/MathTest.cpp
)
set(ALL_SOURCES
${PROJECT_CODE}
${TEST_SOURCES}
src/main.cpp
tests/main.cpp
)
add_custom_target(
clang-format
COMMAND clang-format -i ${ALL_SOURCES}
)
add_subdirectory(googletest)
include_directories(googletest include 3rd_party)
add_library(haruno-lib
${PROJECT_CODE}
)
set_target_properties(haruno-lib PROPERTIES OUTPUT_NAME haruno)
add_executable(haruno
src/main.cpp
)
target_link_libraries(haruno haruno-lib ${CMAKE_THREAD_LIBS_INIT})
add_executable(test
${TEST_SOURCES}
tests/main.cpp)
target_link_libraries(test haruno-lib gtest gtest_main ${CMAKE_THREAD_LIBS_INIT})