-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (28 loc) · 961 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.13)
project(T44RT)
set(CMAKE_C_STANDARD 90)
macro(ASSERT test comment)
if (NOT ${test})
message("Assertion failed: ${comment}")
endif (NOT ${test})
endmacro(ASSERT)
if (CMAKE_BUILD_TYPE MATCHES "Release")
add_compile_options("-O2")
endif ()
#find_package(GLEW REQUIRED)
#ASSERT(GLEW_FOUND "can't find glew")
#if (GLEW_FOUND)
# include_directories(${GLEW_INCLUDE_DIRS})
# link_libraries(${GLEW_LIBRARIES})
#endif ()
find_package(GLUT REQUIRED)
find_package(OpenGL REQUIRED)
ASSERT(GLUT_FOUND "can't find glut")
ASSERT(OPENGL_FOUND "can't find OPENGL")
if (GLUT_FOUND AND OPENGL_FOUND)
include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS})
link_libraries(${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
endif ()
add_compile_options("-Wno-deprecated-declarations")
add_compile_options("--std=c++11")
add_executable(T44RT Ray_tracing_main.cpp objects/point_source.h objects/materials.cpp)