-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
53 lines (40 loc) · 1.21 KB
/
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
44
45
46
47
48
49
50
51
52
53
cmake_minimum_required (VERSION 3.11 FATAL_ERROR)
project(rt)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror")
include(FetchContent)
FetchContent_Declare(
opengl_download
URL https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.zip
)
FetchContent_GetProperties(sfml_download)
if(NOT opengl_download_POPULATED)
FetchContent_Populate(opengl_download)
add_subdirectory(${opengl_download_SOURCE_DIR} ${opengl_download_BINARY_DIR})
endif()
FetchContent_Declare(
glm_download
URL https://github.com/g-truc/glm/archive/0.9.9.0.zip
)
FetchContent_GetProperties(sfml_download)
if(NOT glm_download_POPULATED)
FetchContent_Populate(glm_download)
add_subdirectory(${glm_download_SOURCE_DIR} ${glm_download_BINARY_DIR})
endif()
include_directories(${opengl_download_SOURCE_DIR}/include)
include_directories(${glm_download_SOURCE_DIR})
include_directories(include)
add_executable(rt
src/main.cpp
src/Camera.cpp
src/Cone.cpp
src/Plane.cpp
src/Sphere.cpp
src/Light.cpp
src/Factory.cpp
src/Parse.cpp
src/Loop.cpp
src/Calculate.cpp)
find_package (OpenGL REQUIRED)
target_link_libraries (rt ${OPENGL_LIBRARIES})
target_link_libraries(rt glfw)