Reconcile the standalone and libretro build systems

This commit is contained in:
刘皓 2025-04-09 23:52:12 -04:00
parent ecd8e50e9e
commit ae19c0e42e
No known key found for this signature in database
GPG key ID: 7901753DB465B711
8 changed files with 927 additions and 1007 deletions

View file

@ -25,3 +25,17 @@ foreach file : embedded_assets_f
) )
count += 1 count += 1
endforeach endforeach
if is_libretro
global_sources += custom_target(
'GMGSx',
input: 'GMGSx.sf2',
output: 'GMGSx.sf2.cpp',
command: [
embedtool,
'@INPUT@',
'@OUTPUT@',
'mkxp_gmgsx_sf2',
],
)
endif

View file

@ -0,0 +1,8 @@
global_sources += files([
'binding-base.cpp',
'binding-util.cpp',
'module_rpg.cpp',
'sandbox.cpp',
'wasi.cpp',
'wasm-rt.cpp',
])

View file

@ -0,0 +1,3 @@
#include "../binding/module_rpg1.rb.xxd"
#include "../binding/module_rpg2.rb.xxd"
#include "../binding/module_rpg3.rb.xxd"

File diff suppressed because it is too large Load diff

View file

@ -1,88 +1,360 @@
physfs = dependency('physfs', version: '>=2.1', static: build_static) if is_libretro
openal = dependency('openal', static: build_static, method: 'pkg-config') cmake = import('cmake')
theora = dependency('theora', static: build_static)
vorbisfile = dependency('vorbisfile', static: build_static)
vorbis = dependency('vorbis', static: build_static)
ogg = dependency('ogg', static: build_static)
sdl2 = dependency('SDL2', static: build_static)
sdl_sound = compilers['cpp'].find_library('SDL2_sound')
sdl2_ttf = dependency('SDL2_ttf', static: build_static)
freetype = dependency('freetype2', static: build_static)
pixman = dependency('pixman-1', static: build_static)
png = dependency('libpng', static: build_static)
zlib = dependency('zlib', static: build_static)
uchardet = dependency('uchardet', static: build_static)
# As no pkg-config file is generated for static sdl2_image, and pkg-config is global_args += '-DMPG123_NO_LARGENAME'
# the default option for meson detecting dependencies, pkg-config will fail to global_args += '-DGL_GLES_PROTOTYPES=0'
# find sdl2_image.pc in the build's lib/pkgconfig folder and instead pull it
# from the locally installed packages if it exists.
# To work around this, we first check to see if cmake can find our sdl2_image
# sub project and use that, then check using pkg-config as normal if we are not
# building the sub project.
# It looks like upstream SDL_image fixed this for SDL3, so we can hopefully
# remove this workaround after eventually upgrading to SDL3.
sdl2_image = dependency('SDL2_image', modules: ['SDL2_image::SDL2_image-static', 'SDL2_image::brotlidec-static', 'SDL2_image::brotlicommon-static', 'SDL2_image::hwy', 'SDL2_image::jxl_dec-static'], static: build_static, method: 'cmake', required: false)
if sdl2_image.found() == false
sdl2_image = dependency('SDL2_image', modules: ['SDL2_image::SDL2_image-static', 'SDL2_image::brotlidec-static', 'SDL2_image::brotlicommon-static', 'SDL2_image::hwy', 'SDL2_image::jxl_dec-static'], static: build_static)
endif
if host_system == 'windows' if host_system == 'darwin'
bz2 = dependency('bzip2', static: build_static) global_dependencies += compilers['cpp'].find_library('iconv')
iconv = compilers['cpp'].find_library('iconv', static: build_static) endif
global_dependencies += subproject('libretro-common').get_variable('libretro_common')
boost_options = cmake.subproject_options()
boost_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'BUILD_TESTING': false,
})
global_dependencies += [
cmake.subproject('boost_asio', options: boost_options).dependency('boost_asio'),
cmake.subproject('boost_mp11', options: boost_options).dependency('boost_mp11'),
cmake.subproject('boost_describe', options: boost_options).dependency('boost_describe'),
cmake.subproject('boost_config', options: boost_options).dependency('boost_config'),
cmake.subproject('boost_assert', options: boost_options).dependency('boost_assert'),
cmake.subproject('boost_static_assert', options: boost_options).dependency('boost_static_assert'),
cmake.subproject('boost_throw_exception', options: boost_options).dependency('boost_throw_exception'),
cmake.subproject('boost_core', options: boost_options).dependency('boost_core'),
cmake.subproject('boost_container_hash', options: boost_options).dependency('boost_container_hash'),
cmake.subproject('boost_type_index', options: boost_options).dependency('boost_type_index'),
cmake.subproject('boost_type_traits', options: boost_options).dependency('boost_type_traits'),
cmake.subproject('boost_optional', options: boost_options).dependency('boost_optional'),
]
zlib_options = cmake.subproject_options()
zlib_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'BUILD_SHARED_LIBS': false,
'ZLIB_BUILD_EXAMPLES': false,
})
global_dependencies += cmake.subproject(host_system == 'darwin' ? 'zlib-darwin' : 'zlib', options: zlib_options).dependency('zlibstatic')
physfs_options = cmake.subproject_options()
physfs_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'PHYSFS_BUILD_STATIC': true,
'PHYSFS_BUILD_SHARED': false,
'PHYSFS_BUILD_TEST': false,
'PHYSFS_BUILD_DOCS': false,
})
global_dependencies += cmake.subproject('physfs', options: physfs_options).dependency('physfs-static')
openal_options = cmake.subproject_options()
openal_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'LIBTYPE': 'STATIC',
'ALSOFT_DLOPEN': false,
'ALSOFT_UTILS': false,
'ALSOFT_NO_CONFIG_UTIL': true,
'ALSOFT_EXAMPLES': false,
'ALSOFT_UPDATE_BUILD_VERSION': false,
'ALSOFT_EMBED_HRTF_DATA': false,
'ALSOFT_RTKIT': false,
'ALSOFT_BACKEND_PIPEWIRE': false,
'ALSOFT_BACKEND_PULSEAUDIO': false,
'ALSOFT_BACKEND_ALSA': false,
'ALSOFT_BACKEND_OSS': false,
'ALSOFT_BACKEND_SOLARIS': false,
'ALSOFT_BACKEND_SNDIO': false,
'ALSOFT_BACKEND_WINMM': false,
'ALSOFT_BACKEND_DSOUND': false,
'ALSOFT_BACKEND_WASAPI': false,
'ALSOFT_BACKEND_OTHERIO': false,
'ALSOFT_BACKEND_JACK': false,
'ALSOFT_BACKEND_COREAUDIO': false,
'ALSOFT_BACKEND_OBOE': false,
'ALSOFT_BACKEND_OPENSL': false,
'ALSOFT_BACKEND_PORTAUDIO': false,
'ALSOFT_BACKEND_SDL3': false,
'ALSOFT_BACKEND_SDL2': false,
'ALSOFT_BACKEND_WAVE': false,
})
global_dependencies += cmake.subproject('openal-soft', options: openal_options).dependency('OpenAL')
global_dependencies += cmake.subproject('openal-soft', options: openal_options).dependency('alsoft.fmt')
fluidsynth_options = cmake.subproject_options()
fluidsynth_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'BUILD_SHARED_LIBS': false,
'enable-aufile': false,
'enable-dbus': false,
'enable-ipv6 ': false,
'enable-jack': false,
'enable-ladspa': false,
'enable-libinstpatch': false,
'enable-libsndfile': false,
'enable-midishare': false,
'enable-opensles': false,
'enable-oboe': false,
'enable-network': false,
'enable-oss': false,
'enable-dsound': false,
'enable-waveout': false,
'enable-winmidi': false,
'enable-sdl2': false,
'enable-pkgconfig': false,
'enable-pulseaudio': false,
'enable-readline': false,
'enable-threads': false,
'enable-lash': false,
'enable-alsa': false,
'enable-systemd': false,
'enable-coreaudio': false,
'enable-coremidi': false,
'enable-framework': false,
'enable-dart': false,
})
global_dependencies += cmake.subproject('fluidsynth', options: fluidsynth_options).dependency('libfluidsynth')
ogg_options = cmake.subproject_options()
ogg_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'BUILD_SHARED_LIBS': false,
'BUILD_TESTING': false,
'BUILD_FRAMEWORK': false,
})
global_dependencies += cmake.subproject('ogg', options: ogg_options).dependency('ogg')
vorbis_options = cmake.subproject_options()
vorbis_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'BUILD_SHARED_LIBS': false,
'BUILD_TESTING': false,
'BUILD_FRAMEWORK': false,
})
global_dependencies += cmake.subproject('vorbis', options: vorbis_options).dependency('vorbis')
global_dependencies += cmake.subproject('vorbis', options: vorbis_options).dependency('vorbisfile')
flac_options = cmake.subproject_options()
flac_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'BUILD_SHARED_LIBS': false,
'BUILD_CXXLIBS': false,
'BUILD_PROGRAMS': false,
'BUILD_EXAMPLES': false,
'BUILD_TESTING': false,
'BUILD_DOCS': false,
'BUILD_UTILS': false,
'ENABLE_MULTITHREADING': false,
'INSTALL_MANPAGES': false,
'WITH_OGG': false,
'WITH_FORTIFY_SOURCE': false,
'WITH_STACK_PROTECTOR': false,
})
global_dependencies += cmake.subproject('flac', options: flac_options).dependency('FLAC')
opus_options = cmake.subproject_options()
opus_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'BUILD_SHARED_LIBS': false,
'OPUS_BUILD_SHARED_LIBRARY': false,
'OPUS_BUILD_TESTING': false,
'OPUS_CUSTOM_MODES': false,
'OPUS_BUILD_PROGRAMS': false,
'OPUS_DISABLE_INTRINSICS': true,
'OPUS_FLOAT_APPROX': false,
'OPUS_BUILD_FRAMEWORK': false,
'OPUS_STATIC_RUNTIME': false,
'OPUS_FORTIFY_SOURCE': false,
'OPUS_STACK_PROTECTOR': false,
})
global_dependencies += cmake.subproject('opus', options: opus_options).dependency('opus')
mpg123_options = cmake.subproject_options()
mpg123_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'BUILD_SHARED_LIBS': false,
'BUILD_PROGRAMS': false,
'BUILD_LIBOUT123': false,
'CHECK_MODULES': false,
'FIFO': false,
})
global_dependencies += cmake.subproject('mpg123', options: mpg123_options).dependency('libmpg123')
global_dependencies += cmake.subproject('mpg123', options: mpg123_options).dependency('compat')
libsndfile_options = cmake.subproject_options()
libsndfile_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'BUILD_SHARED_LIBS': false,
'BUILD_PROGRAMS': false,
'BUILD_EXAMPLES': false,
'BUILD_REGTEST': false,
'BUILD_TESTING': false,
'ENABLE_CPACK': false,
'ENABLE_PACKAGE_CONFIG': false,
'INSTALL_PKGCONFIG_MODULE': false,
'ENABLE_EXTERNAL_LIBS': true,
'ENABLE_MPEG': true,
'ENABLE_EXPERIMENTAL': false,
})
global_dependencies += cmake.subproject('libsndfile', options: libsndfile_options).dependency('sndfile')
pixman_region_options = cmake.subproject_options()
pixman_region_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'CMAKE_BUILD_TYPE': 'None',
})
global_dependencies += cmake.subproject('pixman-region', options: pixman_region_options).dependency('pixman-region')
global_dependencies += subproject('stb').get_variable('stb')
global_sources += files('stb_image.c', 'stb_sprintf.c')
global_dependencies += subproject('opengl-registry').get_variable('opengl_registry')
freetype_options = [
'cflags=@0@'.format(','.join(global_args)),
'cppflags=@0@'.format(','.join(global_args)),
'default_library=static',
'b_staticpic=@0@'.format(use_pic),
'brotli=disabled',
'bzip2=disabled',
'harfbuzz=disabled',
'mmap=disabled',
'png=disabled',
'tests=disabled',
'zlib=disabled',
]
global_dependencies += subproject('freetype', default_options: freetype_options).get_variable('freetype_dep')
else else
bz2 = compilers['cpp'].find_library('bz2') physfs = dependency('physfs', version: '>=2.1', static: build_static)
# FIXME: Specifically asking for static doesn't work if iconv isn't openal = dependency('openal', static: build_static, method: 'pkg-config')
# installed in the system prefix somewhere theora = dependency('theora', static: build_static)
iconv = compilers['cpp'].find_library('iconv') vorbisfile = dependency('vorbisfile', static: build_static)
global_dependencies += compilers['cpp'].find_library('charset') vorbis = dependency('vorbis', static: build_static)
endif ogg = dependency('ogg', static: build_static)
sdl2 = dependency('SDL2', static: build_static)
sdl_sound = compilers['cpp'].find_library('SDL2_sound')
sdl2_ttf = dependency('SDL2_ttf', static: build_static)
freetype = dependency('freetype2', static: build_static)
pixman = dependency('pixman-1', static: build_static)
png = dependency('libpng', static: build_static)
zlib = dependency('zlib', static: build_static)
uchardet = dependency('uchardet', static: build_static)
# If OpenSSL is present, you get HTTPS support # As no pkg-config file is generated for static sdl2_image, and pkg-config is
if get_option('enable-https') == true # the default option for meson detecting dependencies, pkg-config will fail to
openssl = dependency('openssl', required: false, static: build_static) # find sdl2_image.pc in the build's lib/pkgconfig folder and instead pull it
if openssl.found() == true # from the locally installed packages if it exists.
global_dependencies += openssl # To work around this, we first check to see if cmake can find our sdl2_image
global_args += '-DMKXPZ_SSL' # sub project and use that, then check using pkg-config as normal if we are not
if host_system == 'windows' # building the sub project.
global_link_args += '-lcrypt32' # It looks like upstream SDL_image fixed this for SDL3, so we can hopefully
endif # remove this workaround after eventually upgrading to SDL3.
else sdl2_image = dependency('SDL2_image', modules: ['SDL2_image::SDL2_image-static', 'SDL2_image::brotlidec-static', 'SDL2_image::brotlicommon-static', 'SDL2_image::hwy', 'SDL2_image::jxl_dec-static'], static: build_static, method: 'cmake', required: false)
warning('Could not locate OpenSSL. HTTPS will be disabled.') if sdl2_image.found() == false
sdl2_image = dependency('SDL2_image', modules: ['SDL2_image::SDL2_image-static', 'SDL2_image::brotlidec-static', 'SDL2_image::brotlicommon-static', 'SDL2_image::hwy', 'SDL2_image::jxl_dec-static'], static: build_static)
endif endif
endif
# Windows needs to be treated like a special needs child here
explicit_libs = ''
if host_system == 'windows'
# Newer versions of Ruby will refuse to link without these
explicit_libs += 'libmsvcrt;libgcc;libmingwex;libgmp;'
endif
if build_static == true
if host_system == 'windows' if host_system == 'windows'
# '-static-libgcc', '-static-libstdc++' are here to avoid needing to ship a separate libgcc_s_seh-1.dll on Windows; it still works without those flags if you have the dll. bz2 = dependency('bzip2', static: build_static)
global_link_args += ['-static-libgcc', '-static-libstdc++', '-Wl,-Bstatic', '-lgcc', '-lstdc++', '-lpthread', '-Wl,-Bdynamic'] iconv = compilers['cpp'].find_library('iconv', static: build_static)
else else
global_link_args += ['-static-libgcc', '-static-libstdc++'] bz2 = compilers['cpp'].find_library('bz2')
# FIXME: Specifically asking for static doesn't work if iconv isn't
# installed in the system prefix somewhere
iconv = compilers['cpp'].find_library('iconv')
global_dependencies += compilers['cpp'].find_library('charset')
endif endif
global_args += '-DAL_LIBTYPE_STATIC'
endif
foreach l : explicit_libs.split(';') # If OpenSSL is present, you get HTTPS support
if get_option('enable-https') == true
openssl = dependency('openssl', required: false, static: build_static)
if openssl.found() == true
global_dependencies += openssl
global_args += '-DMKXPZ_SSL'
if host_system == 'windows'
global_link_args += '-lcrypt32'
endif
else
warning('Could not locate OpenSSL. HTTPS will be disabled.')
endif
endif
# Windows needs to be treated like a special needs child here
explicit_libs = ''
if host_system == 'windows'
# Newer versions of Ruby will refuse to link without these
explicit_libs += 'libmsvcrt;libgcc;libmingwex;libgmp;'
endif
foreach l : explicit_libs.split(';')
if l != '' if l != ''
global_link_args += '-l:' + l + '.a' global_link_args += '-l:' + l + '.a'
endif endif
endforeach endforeach
alcdev_struct = 'ALCdevice_struct' alcdev_struct = 'ALCdevice_struct'
if openal.type_name() == 'pkgconfig' if openal.type_name() == 'pkgconfig'
if openal.version().version_compare('>=1.20.1') if openal.version().version_compare('>=1.20.1')
alcdev_struct = 'ALCdevice' alcdev_struct = 'ALCdevice'
endif
endif
global_args += '-DMKXPZ_ALCDEVICE=' + alcdev_struct
global_dependencies += [openal, zlib, bz2, sdl2, sdl_sound, pixman, physfs, theora, vorbisfile, vorbis, ogg, sdl2_ttf, freetype, sdl2_image, png, iconv, uchardet]
if host_system == 'windows'
global_dependencies += compilers['cpp'].find_library('wsock32')
endif
if get_option('shared_fluid') == true
fluidsynth = dependency('fluidsynth', static: build_static)
global_args += '-DSHARED_FLUID'
global_dependencies += fluidsynth
if host_system == 'windows'
global_dependencies += compilers['cpp'].find_library('dsound')
endif
endif endif
endif endif
global_args += '-DMKXPZ_ALCDEVICE=' + alcdev_struct if get_option('cjk_fallback_font') == true
global_args += '-DMKXPZ_CJK_FONT'
endif
global_include_dirs += include_directories('.', global_include_dirs += include_directories('.',
'audio', 'audio',
@ -96,58 +368,41 @@ global_include_dirs += include_directories('.',
'util', 'util/sigslot', 'util/sigslot/adapter' 'util', 'util/sigslot', 'util/sigslot/adapter'
) )
global_dependencies += [openal, zlib, bz2, sdl2, sdl_sound, pixman, physfs, theora, vorbisfile, vorbis, ogg, sdl2_ttf, freetype, sdl2_image, png, iconv, uchardet]
if host_system == 'windows'
global_dependencies += compilers['cpp'].find_library('wsock32')
endif
if get_option('shared_fluid') == true
fluidsynth = dependency('fluidsynth', static: build_static)
add_project_arguments('-DSHARED_FLUID', language: 'cpp')
global_dependencies += fluidsynth
if host_system == 'windows'
global_dependencies += compilers['cpp'].find_library('dsound')
endif
endif
if get_option('cjk_fallback_font') == true
add_project_arguments('-DMKXPZ_CJK_FONT', language: 'cpp')
endif
main_source = files( main_source = files(
'main.cpp', is_libretro ? 'core.cpp' : 'main.cpp',
'config.cpp', is_libretro ? [] : 'config.cpp',
'eventthread.cpp', is_libretro ? [] : 'eventthread.cpp',
'settingsmenu.cpp', is_libretro ? [] : 'settingsmenu.cpp',
'sharedstate.cpp', 'sharedstate.cpp',
is_libretro ? 'mkxp-polyfill.cpp' : [],
'audio/alstream.cpp', 'audio/alstream.cpp',
'audio/audio.cpp', 'audio/audio.cpp',
'audio/audiostream.cpp', 'audio/audiostream.cpp',
'audio/fluid-fun.cpp', 'audio/fluid-fun.cpp',
'audio/midisource.cpp', 'audio/midisource.cpp',
'audio/sdlsoundsource.cpp', is_libretro ? 'audio/sndfilesource.cpp' : 'audio/sdlsoundsource.cpp',
'audio/soundemitter.cpp', 'audio/soundemitter.cpp',
'audio/vorbissource.cpp', 'audio/vorbissource.cpp',
'theoraplay/theoraplay.c', is_libretro ? [] : 'theoraplay/theoraplay.c',
'crypto/rgssad.cpp', 'crypto/rgssad.cpp',
'display/autotiles.cpp', 'display/autotiles.cpp',
'display/autotilesvx.cpp', is_libretro ? [] : 'display/autotilesvx.cpp',
'display/bitmap.cpp', 'display/bitmap.cpp',
'display/font.cpp', 'display/font.cpp',
'display/graphics.cpp', 'display/graphics.cpp',
'display/plane.cpp', 'display/plane.cpp',
'display/sprite.cpp', 'display/sprite.cpp',
'display/tilemap.cpp', 'display/tilemap.cpp',
'display/tilemapvx.cpp', is_libretro ? [] : 'display/tilemapvx.cpp',
'display/viewport.cpp', 'display/viewport.cpp',
'display/window.cpp', 'display/window.cpp',
'display/windowvx.cpp', is_libretro ? [] : 'display/windowvx.cpp',
'display/libnsgif/libnsgif.c', is_libretro ? [] : 'display/libnsgif/libnsgif.c',
'display/libnsgif/lzw.c', is_libretro ? [] : 'display/libnsgif/lzw.c',
'display/gl/gl-debug.cpp', 'display/gl/gl-debug.cpp',
'display/gl/gl-fun.cpp', 'display/gl/gl-fun.cpp',
@ -157,26 +412,32 @@ main_source = files(
'display/gl/shader.cpp', 'display/gl/shader.cpp',
'display/gl/texpool.cpp', 'display/gl/texpool.cpp',
'display/gl/tileatlas.cpp', 'display/gl/tileatlas.cpp',
'display/gl/tileatlasvx.cpp', is_libretro ? [] : 'display/gl/tileatlasvx.cpp',
'display/gl/tilequad.cpp', 'display/gl/tilequad.cpp',
'display/gl/vertex.cpp', 'display/gl/vertex.cpp',
'util/iniconfig.cpp', is_libretro ? [] : 'util/iniconfig.cpp',
'util/win-consoleutils.cpp', is_libretro ? [] : 'util/win-consoleutils.cpp',
'etc/etc.cpp', 'etc/etc.cpp',
'etc/table.cpp', 'etc/table.cpp',
'filesystem/filesystem.cpp', 'filesystem/filesystem.cpp',
'filesystem/filesystemImpl.cpp', is_libretro ? [] : 'filesystem/filesystemImpl.cpp',
'input/input.cpp', is_libretro ? [
'input/keybindings.cpp', 'input/input-retro.cpp',
] : [
'input/input.cpp',
'input/keybindings.cpp',
],
'net/LUrlParser.cpp', is_libretro ? [] : [
'net/net.cpp', 'net/LUrlParser.cpp',
'net/net.cpp',
],
'system/systemImpl.cpp' is_libretro ? [] : 'system/systemImpl.cpp',
) )
global_sources += main_source global_sources += main_source

View file

@ -1,10 +1,10 @@
#ifndef MKXPZ_STB_IMAGE_MALLOC_H #ifndef MKXPZ_STB_IMAGE_MALLOC_H
#define MKXPZ_STB_IMAGE_MALLOC_H #define MKXPZ_STB_IMAGE_MALLOC_H
#include <cstdlib> #include <stdlib.h>
#define STBI_MALLOC std::malloc #define STBI_MALLOC malloc
#define STBI_REALLOC std::realloc #define STBI_REALLOC realloc
#define STBI_FREE std::free #define STBI_FREE free
#endif // MKXPZ_STB_IMAGE_MALLOC_H #endif // MKXPZ_STB_IMAGE_MALLOC_H