Skip to content
This repository was archived by the owner on Mar 7, 2024. It is now read-only.

Commit ddb6ee9

Browse files
committed
use pyimgui imgui-cpp so and h
1 parent 2b0db86 commit ddb6ee9

File tree

7 files changed

+14
-11
lines changed

7 files changed

+14
-11
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ implot/*.cpp
1919
implot/*.h
2020
implot/*.c
2121
shlib/*.o
22+
implot/implotcpp/
2223

2324
# Distribution / packaging
2425
.Python

.gitmodules

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[submodule "imgui-cpp"]
2-
path = imgui-cpp
3-
url = https://github.com/ocornut/imgui.git
4-
51
[submodule "implot-cpp"]
62
path = implot-cpp
73
url = https://github.com/epezent/implot.git

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ clean:
2929
.PHONY: solib
3030
solib: bootstrap
3131
make -C shlib
32-
cp shlib/libimplot.so implot/
32+
if ! test -d implot/implotcpp; then mkdir implot/implotcpp; fi
33+
cp shlib/libimplot.so implot/implotcpp
34+
cp implot-cpp/implot.h implot/implotcpp
35+
cp implot-cpp/implot_internal.h implot/implotcpp
3336

3437

3538
.PHONY: build

imgui-cpp

-1
This file was deleted.

setup.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,17 @@ def imgui_location():
155155
"implot.plot", extension_sources("implot/plot"),
156156
extra_compile_args=os_specific_flags,
157157
# XXX: handle Windows/MacOS
158-
extra_link_args=["-Wl,-rpath,$ORIGIN"],
158+
extra_link_args=["-Wl,-rpath,$ORIGIN/implotcpp"],
159159
define_macros=[
160160
# note: for raising custom exceptions directly in ImGui code
161161
('PYIMGUI_CUSTOM_EXCEPTION', None)
162162
] + os_specific_macros + general_macros,
163163
# include_dirs=['imgui', 'implot-cpp'],
164164
# include_dirs=['implot', 'config-cpp', 'imgui-cpp', 'ansifeed-cpp', 'implot-cpp'],
165165
# include_dirs=['implot', 'config-cpp', 'imgui-cpp', 'implot-cpp'],
166-
include_dirs=['implot', 'config-cpp', 'imgui-cpp', 'implot-cpp'],
167-
library_dirs=["implot", imgui_location()],
166+
# include_dirs=['implot', 'config-cpp', 'imgui-cpp', 'implot-cpp'],
167+
include_dirs=['implot', 'config-cpp', imgui_location()+'/imguicpp', 'implot-cpp'],
168+
library_dirs=["implot/implotcpp", imgui_location()+'/imguicpp'],
168169
# order matters; libimplot needs to preceede libimgui!
169170
libraries=["implot", "imgui"],
170171
),

shlib/Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Compile sources into shared library. Tested on Linux.
22

3+
34
EXE = libimplot.so
4-
IMGUI_DIR = ../imgui-cpp
5+
#IMGUI_DIR = ../imgui-cpp
6+
IMGUI_DIR := $(shell python -c "import os, pkg_resources; print(os.path.dirname(pkg_resources.resource_filename('imgui', 'imgui.h')))")/imguicpp
7+
$(warning Using IMGUI_DIR $(IMGUI_DIR))
58
IMPLOT_DIR = ../implot-cpp
69
SOURCES = $(IMPLOT_DIR)/implot.cpp \
710
$(IMPLOT_DIR)/implot_demo.cpp \

0 commit comments

Comments
 (0)