Skip to content

Commit f9af2ca

Browse files
committed
chore: add implot, add options for imnodes & implot
1 parent 8c74155 commit f9af2ca

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
[submodule "vendor/imgui/imnodes"]
1111
path = vendor/imgui/imnodes
1212
url = https://github.com/Nelarius/imnodes.git
13+
[submodule "vendor/imgui/implot"]
14+
path = vendor/imgui/implot
15+
url = https://github.com/epezent/implot.git

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.28.3)
33

44
set(SUPPRESS_VENDOR_WARNINGS ON CACHE BOOL "suppress vendor warnings?")
55

6+
option(ENABLE_IM_NODES "enable ImNodes" ON)
7+
option(ENABLE_IM_PLOT "enable ImPlot" ON)
68

79
add_subdirectory(vendor/raylib)
810
add_subdirectory(vendor/imgui)

vendor/imgui/CMakeLists.txt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
file(GLOB IMGUI_SRC imgui/*.cpp)
2-
file(GLOB IMNODES_SRC imnodes/*.cpp)
2+
set(IMGUI_INCLUDES imgui rlImGui)
3+
4+
if(ENABLE_IM_NODES)
5+
list(APPEND IMGUI_SRC imnodes/imnodes.cpp)
6+
list(APPEND IMGUI_INCLUDES imnodes)
7+
endif()
8+
9+
if(ENABLE_IM_PLOT)
10+
list(APPEND IMGUI_SRC implot/implot.cpp implot/implot_demo.cpp implot/implot_items.cpp)
11+
list(APPEND IMGUI_INCLUDES implot)
12+
endif()
13+
314

415
add_library(imgui STATIC
516
${IMGUI_SRC}
6-
${IMNODES_SRC}
717
rlImGui/rlImGui.cpp
818
)
9-
target_include_directories(imgui PUBLIC imgui imnodes rlImGui)
19+
target_include_directories(imgui PUBLIC ${IMGUI_INCLUDES})
1020
target_link_libraries(imgui PUBLIC raylib)
1121

1222

vendor/imgui/implot

Submodule implot added at 193b9d8

0 commit comments

Comments
 (0)