-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
58 lines (45 loc) · 1.2 KB
/
CMakeLists.txt
File metadata and controls
58 lines (45 loc) · 1.2 KB
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
cmake_minimum_required(VERSION 3.18)
set(CMAKE_BUILD_TYPE Release)
project(cs7302
VERSION 1.0
LANGUAGES C CXX
)
set(OptiX_ROOT_DIR "C:/ProgramData/NVIDIA Corporation/OptiX SDK 7.4.0/")
if (APPLE)
set(CMAKE_MACOSX_RPATH ON)
endif()
if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_CRT_SECURE_NO_WARNINGS")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
###############################################################################
# Everything else
###############################################################################
add_subdirectory(extern/tinyobjloader)
add_subdirectory(extern/tinyexr)
add_subdirectory(extern/json)
include_directories(
headers/
extern/
extern/tinyexr/deps/miniz/
)
###############################################################################
# Main executable
###############################################################################
add_executable(render
render.cpp
scene.cpp
camera.cpp
surface.cpp
texture.cpp
light.cpp
shade.cpp
# DEPS
extern/tinyexr/deps/miniz/miniz.c
)
target_link_libraries(render
PRIVATE nlohmann_json::nlohmann_json
)