-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
41 lines (22 loc) · 854 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
cmake_minimum_required(VERSION 3.16)
project(ray_tracer++)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# adding options
add_compile_options(-Wall -Wextra -pedantic)
#find openMP
find_package(OpenMP)
# configure Catch2 unit testing framework
find_package(Catch2 REQUIRED)
#configure SDL2
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
find_package(SDL2 REQUIRED)
find_package(SDL2_image REQUIRED)
#add tinyobjectloader library from git submodule
add_subdirectory(external/objloader)
# separate target for testing
add_subdirectory( library )
add_subdirectory( src )
add_executable( ${PROJECT_NAME} src/main.cpp )
INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS} ${SDL2IMAGE_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${SDL2_LIBRARIES} ${SDL2IMAGE_LIBRARIES} m tracerMath graphics )