From fcf5eb84a1b34d96af50f3d941b99f6c6df8f33a Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Mon, 6 Jan 2025 15:35:11 -0700 Subject: [PATCH] meson: Migrate implot submodule to subproject --- .gitmodules | 4 ---- meson.build | 4 ++++ scripts/archive-source.sh | 2 +- scripts/gen-license.py | 2 +- subprojects/.gitignore | 1 + subprojects/implot.wrap | 4 ++++ ui/thirdparty/implot | 1 - ui/thirdparty/meson.build | 13 ------------- 8 files changed, 11 insertions(+), 20 deletions(-) create mode 100644 subprojects/implot.wrap delete mode 160000 ui/thirdparty/implot diff --git a/.gitmodules b/.gitmodules index 4b46f5dd9e..9bb9f251d2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -43,10 +43,6 @@ [submodule "tests/lcitool/libvirt-ci"] path = tests/lcitool/libvirt-ci url = https://gitlab.com/libvirt/libvirt-ci.git -[submodule "ui/thirdparty/implot"] - path = ui/thirdparty/implot - url = https://github.com/epezent/implot.git - ignore = untracked [submodule "genconfig"] path = genconfig url = https://github.com/mborgerson/genconfig.git diff --git a/meson.build b/meson.build index 7399f72ba5..95c3ee311e 100644 --- a/meson.build +++ b/meson.build @@ -2371,6 +2371,10 @@ imgui_proj = subproject('imgui', required: true, ]) imgui = imgui_proj.get_variable('imgui_dep') +implot_proj = subproject('implot', required: true, + default_options: ['default_library=static']) +implot = implot_proj.get_variable('implot_dep') + subdir('thirdparty') ################# diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index c87e1bc96d..2166048199 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -35,7 +35,7 @@ sub_deinit="" # xemu extras subprojects="$subprojects glslang SPIRV-Reflect volk VulkanMemoryAllocator - nv2a_vsh_cpu tomlplusplus cpp-httplib xxhash imgui" + nv2a_vsh_cpu tomlplusplus cpp-httplib xxhash imgui implot" function cleanup() { local status=$? diff --git a/scripts/gen-license.py b/scripts/gen-license.py index ded4c0b517..8be7aeb3fa 100755 --- a/scripts/gen-license.py +++ b/scripts/gen-license.py @@ -198,7 +198,7 @@ Lib('imgui', 'https://github.com/ocornut/imgui', Lib('implot', 'https://github.com/epezent/implot', mit, 'https://raw.githubusercontent.com/epezent/implot/master/LICENSE', ships_static=all_platforms, - submodule=Submodule('ui/thirdparty/implot') + submodule=Submodule('subprojects/implot.wrap') ), Lib('cpp-httplib', 'https://github.com/yhirose/cpp-httplib', diff --git a/subprojects/.gitignore b/subprojects/.gitignore index 7ac39126ea..f9a4ba8131 100644 --- a/subprojects/.gitignore +++ b/subprojects/.gitignore @@ -27,3 +27,4 @@ tomlplusplus cpp-httplib xxHash-* imgui +implot diff --git a/subprojects/implot.wrap b/subprojects/implot.wrap new file mode 100644 index 0000000000..78c9322e66 --- /dev/null +++ b/subprojects/implot.wrap @@ -0,0 +1,4 @@ +[wrap-git] +url=https://github.com/xemu-project/implot +revision=006a1c23e5706bbe816968163b4d589162257a57 +depth=1 diff --git a/ui/thirdparty/implot b/ui/thirdparty/implot deleted file mode 160000 index cc5e1daa5c..0000000000 --- a/ui/thirdparty/implot +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cc5e1daa5c7f2335a9460ae79c829011dc5cef2d diff --git a/ui/thirdparty/meson.build b/ui/thirdparty/meson.build index 5ea66df9c5..2684979282 100644 --- a/ui/thirdparty/meson.build +++ b/ui/thirdparty/meson.build @@ -1,16 +1,3 @@ -implot_files = files( - 'implot/implot.cpp', - 'implot/implot_items.cpp' - #'implot/implot_demo.cpp', -) - -libimplot = static_library('implot', - sources: implot_files, - include_directories: 'implot', - dependencies: [imgui]) -implot = declare_dependency(link_with: libimplot, - include_directories: 'implot') - noc_ss = ss.source_set() if host_os == 'linux' noc_ss.add([gtk, files('noc_file_dialog/noc_file_dialog_gtk.c')])