-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDependencies.cmake
More file actions
40 lines (37 loc) · 1.02 KB
/
Dependencies.cmake
File metadata and controls
40 lines (37 loc) · 1.02 KB
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
#
# Dependencies
#
include(FetchContent)
# GLFW
find_package(glfw3 3.4 QUIET)
if (NOT glfw3_FOUND)
FetchContent_Declare(
glfw3
DOWNLOAD_EXTRACT_TIMESTAMP OFF
URL https://github.com/glfw/glfw/releases/download/3.4/glfw-3.4.zip
)
FetchContent_GetProperties(glfw3)
if (NOT glfw3_POPULATED)
set(FETCHCONTENT_QUIET NO)
FetchContent_Populate(glfw3)
add_subdirectory(${glfw3_SOURCE_DIR} ${glfw3_BINARY_DIR})
endif()
endif()
# OpenGL
find_package(OpenGL REQUIRED)
# GLM
find_package(glm 1.0.1 QUIET)
if (NOT glm_FOUND)
FetchContent_Declare(
glm
DOWNLOAD_EXTRACT_TIMESTAMP OFF
URL https://github.com/g-truc/glm/archive/refs/tags/1.0.1.zip
)
FetchContent_GetProperties(glm)
if (NOT glm_POPULATED)
set(FETCHCONTENT_QUIET NO)
FetchContent_Populate(glm)
add_subdirectory(${glm_SOURCE_DIR} ${glm_BINARY_DIR})
set_target_properties(glm PROPERTIES FOLDER "Dependencies")
endif()
endif()