meta: Use wrap file for STB rather than submodule
Allows us to use this as a Meson subproject which means that recursive cloning doesn't matter (Meson resolves it for subprojects). Given this subproject doesn't have a meson file, doing subproject() on it would fail, so: Make a wrap file with an overlay that declares a proper dependency. Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
parent
21d631590a
commit
2cea675db0
6 changed files with 19 additions and 6 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -4,6 +4,3 @@
|
||||||
[submodule "subprojects/libliftoff"]
|
[submodule "subprojects/libliftoff"]
|
||||||
path = subprojects/libliftoff
|
path = subprojects/libliftoff
|
||||||
url = https://github.com/emersion/libliftoff.git
|
url = https://github.com/emersion/libliftoff.git
|
||||||
[submodule "subprojects/stb"]
|
|
||||||
path = subprojects/stb
|
|
||||||
url = https://github.com/nothings/stb
|
|
||||||
|
|
|
@ -41,6 +41,8 @@ cap_dep = dependency('libcap')
|
||||||
sdl_dep = dependency('SDL2')
|
sdl_dep = dependency('SDL2')
|
||||||
pipewire_dep = dependency('libpipewire-0.3', required: get_option('pipewire'))
|
pipewire_dep = dependency('libpipewire-0.3', required: get_option('pipewire'))
|
||||||
|
|
||||||
|
stb_dep = dependency('stb')
|
||||||
|
|
||||||
wlroots_dep = dependency(
|
wlroots_dep = dependency(
|
||||||
'wlroots',
|
'wlroots',
|
||||||
version: ['>= 0.13.0', '< 0.14.0'],
|
version: ['>= 0.13.0', '< 0.14.0'],
|
||||||
|
@ -103,7 +105,7 @@ executable(
|
||||||
dep_x11, dep_xdamage, dep_xcomposite, dep_xrender, dep_xext, dep_xfixes,
|
dep_x11, dep_xdamage, dep_xcomposite, dep_xrender, dep_xext, dep_xfixes,
|
||||||
dep_xxf86vm, dep_xres, drm_dep, wayland_server, wayland_protos,
|
dep_xxf86vm, dep_xres, drm_dep, wayland_server, wayland_protos,
|
||||||
xkbcommon, thread_dep, sdl_dep, wlroots_dep,
|
xkbcommon, thread_dep, sdl_dep, wlroots_dep,
|
||||||
vulkan_dep, liftoff_dep, dep_xtst, cap_dep, pipewire_dep,
|
vulkan_dep, liftoff_dep, dep_xtst, cap_dep, pipewire_dep, stb_dep,
|
||||||
],
|
],
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define STB_IMAGE_IMPLEMENTATION
|
#define STB_IMAGE_IMPLEMENTATION
|
||||||
#include "../subprojects/stb/stb_image.h"
|
#include <stb_image.h>
|
||||||
|
|
||||||
#define GPUVIS_TRACE_IMPLEMENTATION
|
#define GPUVIS_TRACE_IMPLEMENTATION
|
||||||
#include "gpuvis_trace_utils.h"
|
#include "gpuvis_trace_utils.h"
|
||||||
|
|
8
subprojects/packagefiles/stb/meson.build
Normal file
8
subprojects/packagefiles/stb/meson.build
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
project('stb', 'c', version : '0.1.0', license : 'MIT')
|
||||||
|
|
||||||
|
stb_dep = declare_dependency(
|
||||||
|
include_directories : include_directories('.'),
|
||||||
|
version : meson.project_version()
|
||||||
|
)
|
||||||
|
|
||||||
|
meson.override_dependency('stb', stb_dep)
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit c0c982601f40183e74d84a61237e968dca08380e
|
|
7
subprojects/stb.wrap
Normal file
7
subprojects/stb.wrap
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[wrap-git]
|
||||||
|
directory = stb
|
||||||
|
|
||||||
|
url = https://github.com/nothings/stb.git
|
||||||
|
revision = head
|
||||||
|
|
||||||
|
patch_directory = stb
|
Loading…
Reference in a new issue