mirror of https://github.com/xemu-project/xemu.git
meson: Migrate imgui submodule to subproject
This commit is contained in:
parent
24c24e030d
commit
09f7787fa9
|
@ -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/imgui"]
|
||||
path = ui/thirdparty/imgui
|
||||
url = https://github.com/xemu-project/imgui.git
|
||||
ignore = untracked
|
||||
[submodule "ui/thirdparty/implot"]
|
||||
path = ui/thirdparty/implot
|
||||
url = https://github.com/epezent/implot.git
|
||||
|
|
23
meson.build
23
meson.build
|
@ -1756,6 +1756,7 @@ if not get_option('opengl').auto() or have_system or have_vhost_user_gpu
|
|||
error('epoxy/egl.h not found')
|
||||
endif
|
||||
endif
|
||||
|
||||
gbm = not_found
|
||||
if (have_system or have_tools) and (virgl.found() or opengl.found())
|
||||
gbm = dependency('gbm', method: 'pkg-config', required: false)
|
||||
|
@ -2348,6 +2349,28 @@ endif
|
|||
|
||||
libsamplerate = dependency('samplerate', method: 'pkg-config', required: true)
|
||||
|
||||
imgui_proj = subproject('imgui', required: true,
|
||||
default_options: [
|
||||
'default_library=static',
|
||||
'dx9=disabled',
|
||||
'dx10=disabled',
|
||||
'dx11=disabled',
|
||||
'dx12=disabled',
|
||||
'metal=disabled',
|
||||
'opengl=enabled',
|
||||
'sdl2_renderer=disabled',
|
||||
'sdl3_renderer=disabled',
|
||||
'vulkan=disabled',
|
||||
'webgpu=disabled',
|
||||
'glfw=disabled',
|
||||
'sdl2=enabled',
|
||||
'sdl3=disabled',
|
||||
'osx=disabled',
|
||||
'win=disabled',
|
||||
'allegro5=disabled',
|
||||
])
|
||||
imgui = imgui_proj.get_variable('imgui_dep')
|
||||
|
||||
subdir('thirdparty')
|
||||
|
||||
#################
|
||||
|
|
|
@ -35,7 +35,7 @@ sub_deinit=""
|
|||
|
||||
# xemu extras
|
||||
subprojects="$subprojects glslang SPIRV-Reflect volk VulkanMemoryAllocator
|
||||
nv2a_vsh_cpu tomlplusplus cpp-httplib xxhash"
|
||||
nv2a_vsh_cpu tomlplusplus cpp-httplib xxhash imgui"
|
||||
|
||||
function cleanup() {
|
||||
local status=$?
|
||||
|
|
|
@ -192,7 +192,7 @@ Lib('slirp', 'https://gitlab.freedesktop.org/slirp',
|
|||
Lib('imgui', 'https://github.com/ocornut/imgui',
|
||||
mit, 'https://raw.githubusercontent.com/ocornut/imgui/master/LICENSE.txt',
|
||||
ships_static=all_platforms,
|
||||
submodule=Submodule('ui/thirdparty/imgui')
|
||||
submodule=Submodule('subprojects/imgui.wrap')
|
||||
),
|
||||
|
||||
Lib('implot', 'https://github.com/epezent/implot',
|
||||
|
|
|
@ -26,3 +26,4 @@ nv2a_vsh_cpu
|
|||
tomlplusplus
|
||||
cpp-httplib
|
||||
xxHash-*
|
||||
imgui
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[wrap-git]
|
||||
url=https://github.com/xemu-project/imgui
|
||||
revision=80cbdab5ecd70db79917c448c333163995e605a5
|
||||
depth=1
|
|
@ -1 +0,0 @@
|
|||
Subproject commit fceff3210b9ecfa8fc66710a00f4cabc2447460f
|
|
@ -1,25 +1,3 @@
|
|||
imgui_files = files(
|
||||
'imgui/imgui.cpp',
|
||||
'imgui/imgui_draw.cpp',
|
||||
'imgui/imgui_tables.cpp',
|
||||
'imgui/imgui_widgets.cpp',
|
||||
'imgui/backends/imgui_impl_sdl2.cpp',
|
||||
'imgui/backends/imgui_impl_opengl3.cpp',
|
||||
'imgui/misc/cpp/imgui_stdlib.cpp',
|
||||
#'imgui/imgui_demo.cpp',
|
||||
)
|
||||
|
||||
imgui_cppargs = ['-DIMGUI_IMPL_OPENGL_LOADER_CUSTOM',
|
||||
'-include', 'imgui_impl_opengl3_loader_override.h']
|
||||
|
||||
libimgui = static_library('imgui',
|
||||
sources: imgui_files,
|
||||
cpp_args: imgui_cppargs,
|
||||
include_directories: ['.', 'imgui'],
|
||||
dependencies: [sdl, opengl])
|
||||
imgui = declare_dependency(link_with: libimgui,
|
||||
include_directories: ['imgui', 'imgui/backends'])
|
||||
|
||||
implot_files = files(
|
||||
'implot/implot.cpp',
|
||||
'implot/implot_items.cpp'
|
||||
|
|
Loading…
Reference in New Issue