-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·43 lines (30 loc) · 986 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
42
43
project(raytracer)
cmake_minimum_required(VERSION 3.0)
add_executable(${PROJECT_NAME}
src/camera.cpp
src/camera.h
src/color.cpp
src/color.h
src/common.h
src/container.cpp
src/container.h
src/helper.cpp
src/helper.h
src/material.h
src/primitives.cpp
src/primitives.h
src/raytracer.cpp
src/scene.cpp
src/scene.h
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Wpedantic -Wshadow -Weffc++ -pedantic" )
find_package(Threads)
target_link_libraries(${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
find_package(OpenCV)
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})
find_package(OpenMP)
if (OPENMP_FOUND AND 1) # use AND 0 to switch to c++11 threads
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
add_definitions(-DUSE_OPENMP=1)
endif()