Add stb_image and PortableGL to libretro builds

This commit is contained in:
刘皓 2025-02-24 23:22:00 -05:00
parent 2029539ece
commit 8ed8dd14ee
No known key found for this signature in database
GPG key ID: 7901753DB465B711
7 changed files with 22 additions and 0 deletions

View file

@ -474,6 +474,8 @@ if is_libretro
cmake.subproject('libsndfile', options: libsndfile_options).dependency('sndfile'),
cmake.subproject('pixman-region', options: pixman_region_options).dependency('pixman-region'),
cmake.subproject('libpng', options: libpng_options).dependency('png_static'),
subproject('stb').get_variable('stb'),
subproject('portablegl').get_variable('portablegl'),
]
if host_system == 'darwin'
libretro_deps += compilers['cpp'].find_library('iconv')
@ -544,7 +546,9 @@ if is_libretro
sources: global_sources + [
'src/core.cpp',
'src/mkxp-threads.cpp',
'src/portablegl.cpp',
'src/sharedstate.cpp',
'src/stb_image.cpp',
'src/audio/alstream.cpp',
'src/audio/audio.cpp',
'src/audio/audiostream.cpp',

2
src/portablegl.cpp Normal file
View file

@ -0,0 +1,2 @@
#define PORTABLEGL_IMPLEMENTATION
#include <portablegl.h>

2
src/stb_image.cpp Normal file
View file

@ -0,0 +1,2 @@
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>

View file

@ -0,0 +1,2 @@
project('portablegl', 'c', meson_version: '>=1.3.0')
portablegl = declare_dependency(include_directories: '.')

View file

@ -0,0 +1,2 @@
project('stb', 'c', meson_version: '>=1.3.0')
stb = declare_dependency(include_directories: '.')

View file

@ -0,0 +1,5 @@
[wrap-git]
url = https://github.com/rswinkle/PortableGL
revision = 0.98.0
depth = 1
patch_directory = portablegl

5
subprojects/stb.wrap Normal file
View file

@ -0,0 +1,5 @@
[wrap-git]
url = https://github.com/nothings/stb
revision = 5c205738c191bcb0abc65c4febfa9bd25ff35234
depth = 1
patch_directory = stb