-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
60 lines (53 loc) · 2.04 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
cmake_minimum_required(VERSION 3.15)
# The project information
project(FluorSwitch VERSION 1.0.0 LANGUAGES C CXX)
message(STATUS "FluorSwitch🏕 version: ${PROJECT_VERSION}")
set(CMAKE_CXX_STANDARD 17)
add_executable(FluorSwitch
src/main.cpp
src/camera/camera.h
src/material/fluorescent_material.h
src/material/material.h
src/material/light.h
src/material/spectral_material.h
src/material/spectral_light.h
src/objects/aarect.h
src/objects/box.h
src/objects/constant_medium.h
src/objects/cornell_box.h
src/objects/geometry.h
src/objects/sphere.h
src/objects/triangle.h
src/render/path_trace.h
src/render/spectral_path_trace.h
src/sampling/pdf.h
src/sampling/spectral_pdf.h
src/scene/scene.h
src/utils/hittable.h
src/utils/hittable_list.h
src/utils/ray.h
src/utils/vec3.h
src/utils/output_file.h
src/utils/my_print.h
src/utils/colors.h
src/utils/aabb.h
src/utils/bvh.h
src/utils/onb.h
src/utils/perlin.h
src/utils/rtw_stb_image.h
src/utils/spectral_distribution.h
src/utils/texture.h
src/utils/util_funcs.h)
include_directories("external/stb")
include_directories("external/tinyobjloader")
include_directories("external/fast-cpp-csv-parser")
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(FluorSwitch PUBLIC "-pthread")
find_package(OpenMP)
if (OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif ()
file(COPY assets DESTINATION ${CMAKE_BINARY_DIR})