-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
41 lines (32 loc) · 920 Bytes
/
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
cmake_minimum_required(VERSION 3.12)
project(raytracer)
find_package(SFML 2 REQUIRED graphics window system)
find_package(Threads REQUIRED)
set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_COMPILER clang++)
add_executable(${CMAKE_PROJECT_NAME}
src/main.cpp
src/vec.cpp
src/color.cpp
src/ray.cpp
src/camera.cpp
src/sphere.cpp
src/hitable.cpp
src/utils.cpp
src/mats/material.cpp
src/mats/lambertian.cpp
src/mats/dielectric.cpp
src/mats/metallic.cpp
)
target_include_directories(${CMAKE_PROJECT_NAME}
PRIVATE ./include
PRIVATE ${SFML_INCLUDE_DIR}
)
target_compile_options(${CMAKE_PROJECT_NAME}
PRIVATE -Ofast -march=native -Wall
# PRIVATE -O0 -g3 -Wall
)
target_link_libraries(${CMAKE_PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT} sfml-graphics sfml-system sfml-window)
set_property(TARGET ${CMAKE_PROJECT_NAME}
PROPERTY CXX_STANDARD 17
)