-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDependencies.cmake
99 lines (82 loc) · 2.66 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
include(FetchContent)
# ------------------------------------------------------------------------------
# CORE LIBRARIES
# nlohmann/json - JSON for Modern C++
FetchContent_Declare(
nlohmann_json
GIT_REPOSITORY https://github.com/nlohmann/json
GIT_TAG bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d # Release Aug 12, 2022
)
# fmt - string formatting
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt
GIT_TAG f5e54359df4c26b6230fc61d38aa294581393084 # Release 10.1.1
)
# tl::expected - expected monad
FetchContent_Populate(
tl_expected
GIT_REPOSITORY https://github.com/TartanLlama/expected
GIT_TAG 292eff8bd8ee230a7df1d6a1c00c4ea0eb2f0362 # Release v1.1.0
SOURCE_DIR tl_expected
)
FetchContent_MakeAvailable(nlohmann_json fmt)
# ------------------------------------------------------------------------------
# GUI LIBRARIES
# GLFW - OpenGL Windowing Library
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
FetchContent_Declare(
glfw
GIT_REPOSITORY https://github.com/glfw/glfw
GIT_TAG 7482de6071d21db77a7236155da44c172a7f6c9e # Release 3.3.8
)
FetchContent_MakeAvailable(glfw)
# OpenGL
find_package(OpenGL REQUIRED)
# Dear ImGui - Graphical User Interface
FetchContent_Populate(
imgui
GIT_REPOSITORY https://github.com/ocornut/imgui
GIT_TAG 64b1e448d20c9be9275af731c34b4c7bf14a8e95
SOURCE_DIR imgui/imgui
)
add_library(imgui STATIC)
target_sources(imgui
PRIVATE
${imgui_SOURCE_DIR}/imgui_demo.cpp
${imgui_SOURCE_DIR}/imgui_draw.cpp
${imgui_SOURCE_DIR}/imgui_tables.cpp
${imgui_SOURCE_DIR}/imgui_widgets.cpp
${imgui_SOURCE_DIR}/imgui.cpp
${imgui_SOURCE_DIR}/backends/imgui_impl_glfw.cpp
${imgui_SOURCE_DIR}/backends/imgui_impl_opengl3.cpp
${imgui_SOURCE_DIR}/misc/cpp/imgui_stdlib.cpp
)
target_include_directories(imgui
PUBLIC
${OPENGL_INCLUDE_DIRS}
PRIVATE
${imgui_SOURCE_DIR}
${imgui_BINARY_DIR}
${imgui_SOURCE_DIR}/imgui
${imgui_BINARY_DIR}/imgui
)
target_link_libraries(imgui PUBLIC ${OPENGL_LIBRARIES} glfw)
# ImGui-FileBrowser - File Browser for Dear ImGui
FetchContent_Populate(
imgui-filebrowser
GIT_REPOSITORY https://github.com/AirGuanZ/imgui-filebrowser
GIT_TAG 29f2e22d8fe033d7b5e78621ee9f3f0a753d7c47
SOURCE_DIR imgui/imgui_filebrowser
)
# ------------------------------------------------------------------------------
# TESTING LIBRARIES
# Catch2 - testing framework
FetchContent_Declare(
catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2
GIT_TAG 3f0283de7a9c43200033da996ff9093be3ac84dc
)
FetchContent_MakeAvailable(catch2)