-
Notifications
You must be signed in to change notification settings - Fork 0
/
dependencies.cmake
46 lines (40 loc) · 1.14 KB
/
dependencies.cmake
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
include(FetchContent)
set(BUILD_SHARED_LIBS OFF)
# Set dependency versions
set(SFML_VERSION 2.6.1)
set(IMGUI_VERSION 1.89)
# Install SFML location
FetchContent_Declare(
SFML
URL "https://github.com/SFML/SFML/archive/${SFML_VERSION}.zip"
DOWNLOAD_EXTRACT_TIMESTAMP true
)
# Set SFML options
option(SFML_BUILD_AUDIO "Build audio" OFF)
option(SFML_BUILD_NETWORK "Build network" OFF)
FetchContent_MakeAvailable(sfml)
# Install Imgui location
FetchContent_Declare(
imgui
URL "https://github.com/ocornut/imgui/archive/v${IMGUI_VERSION}.zip"
DOWNLOAD_EXTRACT_TIMESTAMP true
)
# Set Dear ImGui options
FetchContent_MakeAvailable(imgui)
# Install IMGUI_SFML
FetchContent_Declare(
imgui-sfml
GIT_REPOSITORY https://github.com/SFML/imgui-sfml.git
GIT_TAG 2.6.x
)
# Set ImGui-SFML options
set(IMGUI_DIR ${imgui_SOURCE_DIR})
option(IMGUI_SFML_FIND_SFML "Use find_package to find SFML" OFF)
FetchContent_MakeAvailable(imgui-sfml)
# Range V3
FetchContent_Declare(
Range-v3
GIT_REPOSITORY "https://github.com/ericniebler/range-v3"
GIT_TAG "97452bb3eb74a73fc86504421a6a27c92bce6b99"
)
FetchContent_MakeAvailable(Range-v3)