-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDependencies.cmake
59 lines (50 loc) · 2.03 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
include(cmake/CPM.cmake)
function(raylib_imgui_setup_dependencies)
# Requires C++ 17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
message(STATUS "Include Dear ImGui")
FetchContent_Declare(
ImGui
GIT_REPOSITORY https://github.com/ocornut/imgui
GIT_TAG f401021d5a5d56fe2304056c391e78f81c8d4b8f) # v1.91.5
FetchContent_MakeAvailable(ImGui)
FetchContent_GetProperties(ImGui SOURCE_DIR IMGUI_DIR)
add_library(
imgui STATIC
${imgui_SOURCE_DIR}/imgui.cpp
${imgui_SOURCE_DIR}/imgui_draw.cpp
${imgui_SOURCE_DIR}/imgui_widgets.cpp
${imgui_SOURCE_DIR}/imgui_tables.cpp)
target_include_directories(imgui INTERFACE ${imgui_SOURCE_DIR})
include(cmake/CPM.cmake)
message(STATUS "Include dbg-macro")
cpmaddpackage(
"gh:sharkdp/dbg-macro#fb9976f410f8b29105818b20278cd0be0e853fe8"
)# v0.5.1
message(STATUS "Include fmtlib")
cpmaddpackage("gh:fmtlib/fmt#0c9fce2ffefecfdce794e1859584e25877b7b592"
)# 11.0.2
message(STATUS "Include raylib")
cpmaddpackage("gh:raysan5/raylib#c1ab645ca298a2801097931d1079b10ff7eb9df8"
)# v5.5
message(STATUS "Include spdlog")
cpmaddpackage("gh:gabime/spdlog#27cb4c76708608465c413f6d0e6b8d99a4d84302"
)# v1.14.1
message(STATUS "Include rlImGui")
FetchContent_Declare(
rlImGui
GIT_REPOSITORY https://github.com/raylib-extras/rlImGui
GIT_TAG 583d4fea67e67d431319974f0625f680d3840dfb)
FetchContent_MakeAvailable(rlImGui)
FetchContent_GetProperties(rlImGui SOURCE_DIR RLIMGUI_DIR)
add_library(rlimgui STATIC ${rlimgui_SOURCE_DIR}/rlImGui.cpp)
target_link_libraries(rlimgui PRIVATE imgui raylib)
if(APPLE)
target_link_libraries(rlimgui PUBLIC "-framework IOKit")
target_link_libraries(rlimgui PUBLIC "-framework Cocoa")
target_link_libraries(rlimgui PUBLIC "-framework OpenGL")
endif()
target_include_directories(rlimgui INTERFACE ${rlimgui_SOURCE_DIR})
endfunction()