forked from Mrkol/graphics-course
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththirdparty.cmake
More file actions
64 lines (53 loc) · 1.54 KB
/
thirdparty.cmake
File metadata and controls
64 lines (53 loc) · 1.54 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
cmake_minimum_required(VERSION 3.20)
# Cross-platform WSI
CPMAddPackage(
NAME glfw3
GITHUB_REPOSITORY glfw/glfw
GIT_TAG 3.4
OPTIONS
"GLFW_BUILD_TESTS OFF"
"GLFW_BUILD_EXAMPLES OFF"
"GLFW_BULID_DOCS OFF"
)
# Cross-platform 3D graphics
find_package(Vulkan 1.4.300 REQUIRED)
# Dear ImGui -- easiest way to do GUI
CPMAddPackage(
NAME ImGui
GITHUB_REPOSITORY ocornut/imgui
GIT_TAG v1.91.8
DOWNLOAD_ONLY YES
)
if (ImGui_ADDED)
add_library(DearImGui
${ImGui_SOURCE_DIR}/imgui.cpp ${ImGui_SOURCE_DIR}/imgui_draw.cpp
${ImGui_SOURCE_DIR}/imgui_tables.cpp ${ImGui_SOURCE_DIR}/imgui_widgets.cpp
${ImGui_SOURCE_DIR}/backends/imgui_impl_vulkan.cpp ${ImGui_SOURCE_DIR}/backends/imgui_impl_glfw.cpp)
target_include_directories(DearImGui PUBLIC ${ImGui_SOURCE_DIR})
target_link_libraries(DearImGui Vulkan::Vulkan)
target_link_libraries(DearImGui glfw)
target_compile_definitions(DearImGui PUBLIC IMGUI_USER_CONFIG="${CMAKE_CURRENT_SOURCE_DIR}/common/gui/ImGuiConfig.hpp")
endif ()
# Vector maths for graphics
CPMAddPackage("gh:g-truc/glm#master")
# glTF model parser
CPMAddPackage(
NAME tinygltf
GITHUB_REPOSITORY syoyo/tinygltf
GIT_TAG v2.9.2
OPTIONS
"TINYGLTF_HEADER_ONLY OFF"
"TINYGLTF_BUILD_LOADER_EXAMPLE OFF"
"TINYGLTF_INSTALL OFF"
)
# etna -- our wrapper around Vulkan to make life easier
CPMAddPackage(
NAME etna
GITHUB_REPOSITORY AlexandrShcherbakov/etna
VERSION 1.11.0
)
# Type-erased function containers that actually work
CPMAddPackage(
GITHUB_REPOSITORY Naios/function2
GIT_TAG 4.2.4
)