From 51047cd2e8a1e834d0345e2eadaeb0da70eb7bfc Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Sat, 19 Jan 2019 20:02:13 +0000 Subject: [PATCH] build: move imgui out of src/intel/tools to be reused MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Lionel Landwerlin Acked-by: Jason Ekstrand +1-by: Mike Lothian +1-by: Tapani Pälli +1-by: Eric Engestrom +1-by: Yurii Kolesnykov +1-by: myfreeweb +1-by: Kenneth Graunke --- src/Makefile.am | 15 +++++++++++++++ src/{intel/tools => }/imgui/LICENSE.txt | 0 src/{intel/tools => }/imgui/README | 0 src/{intel/tools => }/imgui/imconfig.h | 0 src/{intel/tools => }/imgui/imgui.cpp | 0 src/{intel/tools => }/imgui/imgui.h | 0 src/{intel/tools => }/imgui/imgui_demo.cpp | 0 src/{intel/tools => }/imgui/imgui_draw.cpp | 0 src/{intel/tools => }/imgui/imgui_internal.h | 0 src/{intel/tools => }/imgui/imgui_memory_editor.h | 0 src/imgui/meson.build | 11 +++++++++++ src/{intel/tools => }/imgui/stb_rect_pack.h | 0 src/{intel/tools => }/imgui/stb_textedit.h | 0 src/{intel/tools => }/imgui/stb_truetype.h | 0 src/intel/Makefile.am | 14 +------------- src/intel/tools/aubinator_viewer.cpp | 4 ++-- src/intel/tools/aubinator_viewer.h | 2 +- src/intel/tools/aubinator_viewer_urb.h | 2 +- src/intel/tools/imgui/imgui_impl_gtk3.cpp | 2 +- src/intel/tools/imgui/imgui_impl_opengl3.cpp | 2 +- src/intel/tools/imgui/meson.build | 12 +++--------- src/meson.build | 1 + 22 files changed, 37 insertions(+), 28 deletions(-) rename src/{intel/tools => }/imgui/LICENSE.txt (100%) rename src/{intel/tools => }/imgui/README (100%) rename src/{intel/tools => }/imgui/imconfig.h (100%) rename src/{intel/tools => }/imgui/imgui.cpp (100%) rename src/{intel/tools => }/imgui/imgui.h (100%) rename src/{intel/tools => }/imgui/imgui_demo.cpp (100%) rename src/{intel/tools => }/imgui/imgui_draw.cpp (100%) rename src/{intel/tools => }/imgui/imgui_internal.h (100%) rename src/{intel/tools => }/imgui/imgui_memory_editor.h (100%) create mode 100644 src/imgui/meson.build rename src/{intel/tools => }/imgui/stb_rect_pack.h (100%) rename src/{intel/tools => }/imgui/stb_textedit.h (100%) rename src/{intel/tools => }/imgui/stb_truetype.h (100%) diff --git a/src/Makefile.am b/src/Makefile.am index 79c2a543fdc..1eda3e581ae 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -136,3 +136,18 @@ libglsl_util_la_SOURCES = \ mesa/program/prog_parameter.c \ mesa/program/symbol_table.c \ mesa/program/dummy_errors.c + +EXTRA_DIST += \ + tools/imgui/imconfig.h \ + tools/imgui/imgui.cpp \ + tools/imgui/imgui.h \ + tools/imgui/imgui_draw.cpp \ + tools/imgui/imgui_demo.cpp \ + tools/imgui/imgui_internal.h \ + tools/imgui/imgui_memory_editor.h \ + tools/imgui/stb_rect_pack.h \ + tools/imgui/stb_textedit.h \ + tools/imgui/stb_truetype.h \ + tools/imgui/README \ + tools/imgui/LICENSE.txt \ + tools/imgui/meson.build diff --git a/src/intel/tools/imgui/LICENSE.txt b/src/imgui/LICENSE.txt similarity index 100% rename from src/intel/tools/imgui/LICENSE.txt rename to src/imgui/LICENSE.txt diff --git a/src/intel/tools/imgui/README b/src/imgui/README similarity index 100% rename from src/intel/tools/imgui/README rename to src/imgui/README diff --git a/src/intel/tools/imgui/imconfig.h b/src/imgui/imconfig.h similarity index 100% rename from src/intel/tools/imgui/imconfig.h rename to src/imgui/imconfig.h diff --git a/src/intel/tools/imgui/imgui.cpp b/src/imgui/imgui.cpp similarity index 100% rename from src/intel/tools/imgui/imgui.cpp rename to src/imgui/imgui.cpp diff --git a/src/intel/tools/imgui/imgui.h b/src/imgui/imgui.h similarity index 100% rename from src/intel/tools/imgui/imgui.h rename to src/imgui/imgui.h diff --git a/src/intel/tools/imgui/imgui_demo.cpp b/src/imgui/imgui_demo.cpp similarity index 100% rename from src/intel/tools/imgui/imgui_demo.cpp rename to src/imgui/imgui_demo.cpp diff --git a/src/intel/tools/imgui/imgui_draw.cpp b/src/imgui/imgui_draw.cpp similarity index 100% rename from src/intel/tools/imgui/imgui_draw.cpp rename to src/imgui/imgui_draw.cpp diff --git a/src/intel/tools/imgui/imgui_internal.h b/src/imgui/imgui_internal.h similarity index 100% rename from src/intel/tools/imgui/imgui_internal.h rename to src/imgui/imgui_internal.h diff --git a/src/intel/tools/imgui/imgui_memory_editor.h b/src/imgui/imgui_memory_editor.h similarity index 100% rename from src/intel/tools/imgui/imgui_memory_editor.h rename to src/imgui/imgui_memory_editor.h diff --git a/src/imgui/meson.build b/src/imgui/meson.build new file mode 100644 index 00000000000..a5c02839be2 --- /dev/null +++ b/src/imgui/meson.build @@ -0,0 +1,11 @@ +libimgui_core = static_library( + 'intel_imgui_core', + files('imgui.cpp', 'imgui_demo.cpp', 'imgui_draw.cpp'), + cpp_args : ['-w'], + install: false +) + +libimgui_core_dep = declare_dependency( + link_with: libimgui_core, + include_directories: include_directories('.') +) diff --git a/src/intel/tools/imgui/stb_rect_pack.h b/src/imgui/stb_rect_pack.h similarity index 100% rename from src/intel/tools/imgui/stb_rect_pack.h rename to src/imgui/stb_rect_pack.h diff --git a/src/intel/tools/imgui/stb_textedit.h b/src/imgui/stb_textedit.h similarity index 100% rename from src/intel/tools/imgui/stb_textedit.h rename to src/imgui/stb_textedit.h diff --git a/src/intel/tools/imgui/stb_truetype.h b/src/imgui/stb_truetype.h similarity index 100% rename from src/intel/tools/imgui/stb_truetype.h rename to src/imgui/stb_truetype.h diff --git a/src/intel/Makefile.am b/src/intel/Makefile.am index a6df653adef..b4d6a978a85 100644 --- a/src/intel/Makefile.am +++ b/src/intel/Makefile.am @@ -72,23 +72,11 @@ EXTRA_DIST = \ tools/aubinator_viewer.h \ tools/aubinator_viewer_decoder.cpp \ tools/aubinator_viewer_urb.h \ - tools/imgui/README \ - tools/imgui/stb_textedit.h \ - tools/imgui/meson.build \ - tools/imgui/imconfig.h \ - tools/imgui/imgui.cpp \ - tools/imgui/imgui.h \ - tools/imgui/imgui_draw.cpp \ - tools/imgui/imgui_demo.cpp \ - tools/imgui/imgui_internal.h \ tools/imgui/imgui_impl_gtk3.cpp \ tools/imgui/imgui_impl_gtk3.h \ tools/imgui/imgui_impl_opengl3.cpp \ tools/imgui/imgui_impl_opengl3.h \ - tools/imgui/imgui_memory_editor.h \ - tools/imgui/stb_truetype.h \ - tools/imgui/stb_rect_pack.h \ - tools/imgui/LICENSE.txt \ + tools/imgui/meson.build \ tools/intel_sanitize_gpu.c \ tools/intel_sanitize_gpu.in \ tools/intel_dump_gpu.c \ diff --git a/src/intel/tools/aubinator_viewer.cpp b/src/intel/tools/aubinator_viewer.cpp index ef3426b8656..4c11fe4b37d 100644 --- a/src/intel/tools/aubinator_viewer.cpp +++ b/src/intel/tools/aubinator_viewer.cpp @@ -221,13 +221,13 @@ update_mem_for_exec(struct aub_mem *mem, struct aub_file *file, int exec_idx) #include -#include "imgui.h" +#include "imgui/imgui.h" +#include "imgui/imgui_memory_editor.h" #include "imgui_impl_gtk3.h" #include "imgui_impl_opengl3.h" #include "aubinator_viewer.h" #include "aubinator_viewer_urb.h" -#include "imgui_memory_editor.h" struct window { struct list_head link; /* link in the global list of windows */ diff --git a/src/intel/tools/aubinator_viewer.h b/src/intel/tools/aubinator_viewer.h index f8c2b776fe0..a311b898b95 100644 --- a/src/intel/tools/aubinator_viewer.h +++ b/src/intel/tools/aubinator_viewer.h @@ -1,7 +1,7 @@ #ifndef AUBINATOR_VIEWER_H #define AUBINATOR_VIEWER_H -#include "imgui.h" +#include "imgui/imgui.h" #include "common/gen_decoder.h" #include "common/gen_disasm.h" diff --git a/src/intel/tools/aubinator_viewer_urb.h b/src/intel/tools/aubinator_viewer_urb.h index ef7412e540c..f9e7d5e344e 100644 --- a/src/intel/tools/aubinator_viewer_urb.h +++ b/src/intel/tools/aubinator_viewer_urb.h @@ -3,7 +3,7 @@ #include "aubinator_viewer.h" -#include "imgui.h" +#include "imgui/imgui.h" struct AubinatorViewerUrb { diff --git a/src/intel/tools/imgui/imgui_impl_gtk3.cpp b/src/intel/tools/imgui/imgui_impl_gtk3.cpp index 0e9eb588472..6a1a5a2484c 100644 --- a/src/intel/tools/imgui/imgui_impl_gtk3.cpp +++ b/src/intel/tools/imgui/imgui_impl_gtk3.cpp @@ -8,7 +8,7 @@ #include -#include +#include "imgui/imgui.h" #include "imgui_impl_gtk3.h" #include diff --git a/src/intel/tools/imgui/imgui_impl_opengl3.cpp b/src/intel/tools/imgui/imgui_impl_opengl3.cpp index d5ef89896f5..b918467a796 100644 --- a/src/intel/tools/imgui/imgui_impl_opengl3.cpp +++ b/src/intel/tools/imgui/imgui_impl_opengl3.cpp @@ -48,7 +48,7 @@ #define _CRT_SECURE_NO_WARNINGS #endif -#include "imgui.h" +#include "imgui/imgui.h" #include "imgui_impl_opengl3.h" #include #if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier diff --git a/src/intel/tools/imgui/meson.build b/src/intel/tools/imgui/meson.build index d714d032f67..71f0d13a9a9 100644 --- a/src/intel/tools/imgui/meson.build +++ b/src/intel/tools/imgui/meson.build @@ -1,10 +1,3 @@ -libintel_imgui_core = static_library( - 'intel_imgui_core', - files('imgui.cpp', 'imgui_demo.cpp', 'imgui_draw.cpp'), - cpp_args : ['-w'], - install: false -) - libintel_imgui_gtk_deps = [ dependency('epoxy'), dependency('gtk+-3.0'), @@ -13,13 +6,14 @@ libintel_imgui_gtk_deps = [ libintel_imgui_gtk = static_library( 'intel_imgui_gtk', files('imgui_impl_gtk3.cpp', 'imgui_impl_opengl3.cpp'), + include_directories: inc_common, dependencies : libintel_imgui_gtk_deps, cpp_args : ['-w'], install: false ) libintel_imgui_gtk_dep = declare_dependency( - link_with: [libintel_imgui_core, libintel_imgui_gtk], - dependencies: libintel_imgui_gtk_deps, + link_with: libintel_imgui_gtk, + dependencies: [libimgui_core_dep, libintel_imgui_gtk_deps], include_directories: include_directories('.') ) diff --git a/src/meson.build b/src/meson.build index ae094fccf6c..d9fe8daa146 100644 --- a/src/meson.build +++ b/src/meson.build @@ -51,6 +51,7 @@ subdir('util') subdir('mapi') # TODO: opengl subdir('compiler') +subdir('imgui') if with_platform_wayland subdir('egl/wayland/wayland-drm') endif -- 2.30.2