meson: Use CMake to configure SDL3

This commit is contained in:
Matt Borgerson
2026-05-05 14:36:59 -07:00
committed by mborgerson
parent 0df849f71c
commit 7c7196b8a4
181 changed files with 28 additions and 1455 deletions
@@ -1,19 +0,0 @@
Copyright (c) 2021 The Meson development team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-478
View File
@@ -1,478 +0,0 @@
project(
'sdl3',
'c',
version: '3.4.8',
license: 'zlib',
meson_version: '>=1.6',
default_options: ['c_std=none'],
)
cc = meson.get_compiler('c')
varr = meson.project_version().split('.')
sdl_major = varr[0].to_int()
sdl_minor = varr[1].to_int()
sdl_patch = varr[2].to_int()
cdata = configuration_data()
cdata.set('HAVE_LIBC', 1)
cdata.set('SDL_DEFAULT_ASSERT_LEVEL', true)
sdl_deps = [
dependency('threads'),
dependency(
'dl',
required: false,
),
cc.find_library(
'm',
required: false,
),
]
add_project_arguments(
'-DUSING_GENERATED_CONFIG_H',
language: 'c',
)
add_project_arguments(
'-DSDL_BUILD_MAJOR_VERSION=@0@'.format(sdl_major),
'-DSDL_BUILD_MINOR_VERSION=@0@'.format(sdl_minor),
'-DSDL_BUILD_MICRO_VERSION=@0@'.format(sdl_patch),
language: 'c',
)
basic_headers = [
['float.h', 'HAVE_FLOAT_H'],
['stdarg.h', 'HAVE_STDARG_H'],
['stddef.h', 'HAVE_STDDEF_H'],
['stdint.h', 'HAVE_STDINT_H'],
['iconv.h', 'HAVE_ICONV_H'],
['inttypes.h', 'HAVE_INTTYPES_H'],
['limits.h', 'HAVE_LIMITS_H'],
['malloc.h', 'HAVE_MALLOC_H'],
['math.h', 'HAVE_MATH_H'],
['memory.h', 'HAVE_MEMORY_H'],
['signal.h', 'HAVE_SIGNAL_H'],
['stdio.h', 'HAVE_STDIO_H'],
['stdlib.h', 'HAVE_STDLIB_H'],
['strings.h', 'HAVE_STRINGS_H'],
['string.h', 'HAVE_STRING_H'],
['sys/types.h', 'HAVE_SYS_TYPES_H'],
['wchar.h', 'HAVE_WCHAR_H'],
['pthread_np.h', 'HAVE_PTHREAD_NP_H'],
['linux/input.h', 'HAVE_LINUX_INPUT_H'],
['ddraw.h', 'HAVE_DDRAW_H'],
['dsound.h', 'HAVE_DSOUND_H'],
['dinput.h', 'HAVE_DINPUT_H'],
['signal.h', 'HAVE_SIGTIMEDWAIT'],
]
foreach i : basic_headers
hname = i[0]
define = i[1]
cdata.set10(define, cc.has_header(hname))
endforeach
check_functions = [
# check token ['HAVE_GCC_ATOMICS']
# check token ['HAVE_GCC_SYNC_LOCK_TEST_AND_SET']
# check token ['HAVE_LIBC']
# check token ['HAVE_LIBC']
['HAVE_DLOPEN', 'dlopen', '#include<dlfcn.h>'],
['HAVE_MALLOC', 'malloc', '#include<stdlib.h>'],
['HAVE_FDATASYNC', 'fdatasync', '#include<unistd.h>'],
['HAVE_GETENV', 'getenv', '#include<stdlib.h>'],
# check token ['HAVE_GETHOSTNAME']
['HAVE_SETENV', 'setenv', '#include<stdlib.h>'],
['HAVE_PUTENV', 'putenv', '#include<stdlib.h>'],
['HAVE_UNSETENV', 'unsetenv', '#include<stdlib.h>'],
['HAVE_ABS', 'abs', '#include<stdlib.h>'],
['HAVE_BCOPY', 'bcopy', '#include<strings.h>'],
['HAVE_MEMSET', 'memset', '#include<string.h>'],
['HAVE_MEMCPY', 'memcpy', '#include<string.h>'],
['HAVE_MEMMOVE', 'memmove', '#include<string.h>'],
['HAVE_MEMCMP', 'memcmp', '#include<string.h>'],
# check token ['HAVE_WCSLEN']
# check token ['HAVE_WCSNLEN']
# check token ['HAVE_WCSLCPY']
# check token ['HAVE_WCSLCAT']
# check token ['HAVE_WCSSTR']
# check token ['HAVE_WCSCMP']
# check token ['HAVE_WCSNCMP']
# check token ['HAVE_WCSTOL']
['HAVE_STRLEN', 'strlen', '#include<string.h>'],
['HAVE_STRNLEN', 'strnlen', '#include<string.h>'],
['HAVE_STRLCPY', 'strlcpy', '#include<string.h>'],
['HAVE_STRLCAT', 'strlcat', '#include<string.h>'],
# check token ['HAVE_STRPBRK']
['HAVE__STRREV', '_strrev', '#include<string.h>'],
['HAVE_INDEX', 'index', '#include<strings.h>'],
['HAVE_RINDEX', 'rindex', '#include<strings.h>'],
['HAVE_STRCHR', 'strchr', '#include<string.h>'],
['HAVE_STRRCHR', 'strrchr', '#include<string.h>'],
['HAVE_STRSTR', 'strstr', '#include<string.h>'],
# check token ['HAVE_STRNSTR']
['HAVE_STRTOK_R', 'strtok_r', '#include<string.h>'],
# check token ['HAVE_ITOA']
# check token ['HAVE__LTOA']
# check token ['HAVE__UITOA']
# check token ['HAVE__ULTOA']
['HAVE_STRTOL', 'strtol', '#include<stdlib.h>'],
['HAVE_STRTOUL', 'strtoul', '#include<stdlib.h>'],
# check token ['HAVE__I64TOA']
# check token ['HAVE__UI64TOA']
['HAVE_STRTOLL', 'strtoll', '#include<stdlib.h>'],
['HAVE_STRTOULL', 'strtoull', '#include<stdlib.h>'],
['HAVE_STRTOD', 'strtod', '#include<stdlib.h>'],
['HAVE_ATOI', 'atoi', '#include<stdlib.h>'],
['HAVE_ATOF', 'atof', '#include<stdlib.h>'],
['HAVE_STRCMP', 'strcmp', '#include<string.h>'],
['HAVE_STRNCMP', 'strncmp', '#include<string.h>'],
['HAVE_VSSCANF', 'vsscanf', '#include<stdio.h>'],
['HAVE_VSNPRINTF', 'vsnprintf', '#include<stdio.h>'],
['HAVE_ACOS', 'acos', '#include<math.h>'],
['HAVE_ACOSF', 'acosf', '#include<math.h>'],
['HAVE_ASIN', 'asin', '#include<math.h>'],
['HAVE_ASINF', 'asinf', '#include<math.h>'],
['HAVE_ATAN', 'atan', '#include<math.h>'],
['HAVE_ATANF', 'atanf', '#include<math.h>'],
['HAVE_ATAN2', 'atan2', '#include<math.h>'],
['HAVE_ATAN2F', 'atan2f', '#include<math.h>'],
['HAVE_CEIL', 'ceil', '#include<math.h>'],
['HAVE_CEILF', 'ceilf', '#include<math.h>'],
['HAVE_COPYSIGN', 'copysign', '#include<math.h>'],
['HAVE_COPYSIGNF', 'copysignf', '#include<math.h>'],
# check token ['HAVE__COPYSIGN']
['HAVE_COS', 'cos', '#include<math.h>'],
['HAVE_COSF', 'cosf', '#include<math.h>'],
['HAVE_EXP', 'exp', '#include<math.h>'],
['HAVE_EXPF', 'expf', '#include<math.h>'],
['HAVE_FABS', 'fabs', '#include<math.h>'],
['HAVE_FABSF', 'fabsf', '#include<math.h>'],
['HAVE_FLOOR', 'floor', '#include<math.h>'],
['HAVE_FLOORF', 'floorf', '#include<math.h>'],
['HAVE_FMOD', 'fmod', '#include<math.h>'],
['HAVE_FMODF', 'fmodf', '#include<math.h>'],
['HAVE_ISINF', 'isinf', '#include<math.h>'],
['HAVE_ISINFF', 'isinff', '#include<math.h>'],
# check token ['HAVE_ISINF_FLOAT_MACRO']
['HAVE_ISNAN', 'isnan', '#include<math.h>'],
['HAVE_ISNANF', 'isnanf', '#include<math.h>'],
# check token ['HAVE_ISNAN_FLOAT_MACRO']
['HAVE_LOG', 'log', '#include<math.h>'],
['HAVE_LOGF', 'logf', '#include<math.h>'],
['HAVE_LOG10', 'log10', '#include<math.h>'],
['HAVE_LOG10F', 'log10f', '#include<math.h>'],
# check token ['HAVE_LROUND']
# check token ['HAVE_LROUNDF']
# check token ['HAVE_MODF']
# check token ['HAVE_MODFF']
['HAVE_POW', 'pow', '#include<math.h>'],
# check token ['HAVE_POWF']
['HAVE_ROUND', 'round', '#include<math.h>'],
# check token ['HAVE_ROUNDF']
['HAVE_SCALBN', 'scalbn', '#include<math.h>'],
# check token ['HAVE_SCALBNF']
['HAVE_SIN', 'sin', '#include<math.h>'],
['HAVE_SINF', 'sinf', '#include<math.h>'],
['HAVE_SQRT', 'sqrt', '#include<math.h>'],
['HAVE_SQRTF', 'sqrtf', '#include<math.h>'],
# check token ['HAVE_TAN']
# check token ['HAVE_TANF']
# check token ['HAVE_TRUNC']
# check token ['HAVE_TRUNCF']
# check token ['HAVE__FSEEKI64']
# check token ['HAVE_FOPEN64']
['HAVE_FSEEKO', 'fseeko', '#include<stdio.h>'],
['HAVE_FSEEKO64', 'fseeko64', '#include<stdio.h>'],
# check token ['HAVE_MEMFD_CREATE']
# check token ['HAVE_POSIX_FALLOCATE']
['HAVE_SIGACTION', 'sigaction', '#include<signal.h>'],
# check token ['HAVE_SA_SIGACTION']
# check token ['HAVE_ST_MTIM']
['HAVE_SETJMP', 'setjmp', '#include<setjmp.h>'],
['HAVE_NANOSLEEP', 'nanosleep', '#include<time.h>'],
['HAVE_GMTIME_R', 'gmtime_r', '#include<time.h>'],
# check token ['HAVE_LOCALTIME_R']
# check token ['HAVE_NL_LANGINFO']
['HAVE_SYSCONF', 'sysconf', '#include<unistd.h>'],
['HAVE_SYSCTLBYNAME', 'sysctlbyname', '#include<sys/sysctl.h>'],
['HAVE_CLOCK_GETTIME', 'clock_gettime', '#include<time.h>'],
['HAVE_GETPAGESIZE', 'getpagesize', '#include<unistd.h>'],
# check token ['HAVE_ICONV']
['HAVE_PTHREAD_SETNAME_NP', 'pthread_setname_np', '#include<pthread.h>'],
['HAVE_PTHREAD_SET_NAME_NP', 'pthread_set_name_np', '#include<pthread.h>'],
['HAVE_SEM_TIMEDWAIT', 'sem_timedwait', '#include<semaphore.h>'],
# check token ['HAVE_GETAUXVAL']
# check token ['HAVE_ELF_AUX_INFO']
['HAVE_POLL', 'poll', '#include<poll.h>'],
# check token ['HAVE__EXIT']
# check token ['HAVE_FCITX']
['HAVE_INOTIFY_INIT1', 'inotify_init1', '#include<sys/inotify.h>'],
# check token ['HAVE_INOTIFY']
# check token ['HAVE_LIBUSB']
# check token ['HAVE_O_CLOEXEC']
]
foreach f : check_functions
if cc.has_function(
f.get(1),
prefix: f.get(2),
dependencies: [sdl_deps],
)
cdata.set(f.get(0), 1)
endif
endforeach
sources = []
cdata.set('SDL_XKBCOMMON_VERSION_MAJOR', 0)
cdata.set('SDL_XKBCOMMON_VERSION_MINOR', 0)
cdata.set('SDL_XKBCOMMON_VERSION_PATCH', 0)
if host_machine.system() == 'darwin'
add_languages(
'objc',
native: false,
)
add_project_arguments(
'-fobjc-arc',
language: 'objc',
)
endif
if host_machine.system() == 'linux'
## some of these checks could be done via have include
## but it is done this way to be consistent from what CMake does
## additionally these values are not defined in the config file
# check Kronos EGL support
have_opengl_egl_code = '''
#define EGL_API_FB
#define MESA_EGL_NO_X11_HEADERS
#define EGL_NO_X11
#include <EGL/egl.h>
#include <EGL/eglext.h>
int main (int argc, char** argv) { return 0; }
'''
have_opengl_egl = cc.compiles(
have_opengl_egl_code,
name: 'have OpenGL EGL support',
)
# check OpenGL GLX support
have_opengl_glx_code = '''
#include <GL/glx.h>
int main(int argc, char** argv) { return 0; }
'''
have_opengl_glx = cc.compiles(
have_opengl_glx_code,
name: 'have OpenGL GLX support',
)
# check OpenGL support
have_opengl_code = '''
#include <GL/gl.h>
#include <GL/glext.h>
int main(int argc, char** argv) { return 0; }
'''
have_opengl = cc.compiles(
have_opengl_code,
name: 'have OpenGL support',
)
# ideally this should have a check for compile like the cmake configuration, see sdlchecks.cmake
cdata.set('SDL_PLATFORM_LINUX', 1)
cdata.set('SDL_THREAD_PTHREAD', 1)
cdata.set('HAVE_STRLEN', 1)
cdata.set('SDL_LOADSO_DLOPEN', 1)
cdata.set('SDL_PROCESS_POSIX', 1)
cdata.set('SDL_SENSOR_DUMMY', 1)
cdata.set('SDL_POWER_LINUX', 1)
cdata.set('SDL_INPUT_LINUXEV', 1)
if have_opengl_egl
cdata.set('SDL_VIDEO_OPENGL_EGL', 1)
endif
if have_opengl_glx
cdata.set('SDL_VIDEO_OPENGL_GLX', 1)
endif
if have_opengl
cdata.set('SDL_VIDEO_OPENGL', 1)
cdata.set('SDL_VIDEO_RENDER_OGL', 1)
endif
cdata.set('SDL_GPU_VULKAN', 1)
cdata.set('SDL_VIDEO_VULKAN', 1)
cdata.set('SDL_VIDEO_RENDER_VULKAN', 1)
cdata.set('SDL_TIMER_UNIX', 1)
sdl_deps += dependency('libudev')
sdl_deps += dependency('dbus-1')
sdl_deps += dependency('libpipewire-0.3')
sdl_deps += dependency('wayland-client')
sdl_deps += dependency('wayland-egl')
sdl_deps += dependency('wayland-cursor')
xkbcommon_dep = dependency('xkbcommon')
sdl_deps += xkbcommon_dep
cdata.set('HAVE_DBUS_DBUS_H', 1)
wayland_scanner = find_program('wayland-scanner')
subdir('wayland-protocols')
elif host_machine.system() == 'windows'
# XInput(legacy) is provided by the Microsoft DirectX SDK and requires windows header include
have_xinput_header_code = '''
#include <windows.h>
#include <xinput.h>
int main(int argc, char **argv) { }
'''
have_xinput_header = cc.compiles(
have_xinput_header_code,
name: 'have XInput support',
)
# Microsoft Windows gaming input header is provided by the Windows SDK (winrt)
have_windows_gaming_input_header_code = '''
#define COBJMACROS
#include <windows.gaming.input.h>
static __x_ABI_CWindows_CGaming_CInput_CIGamepadStatics2 *s2;
int main(int argc, char **argv) { }
'''
have_windows_gaming_input_header = cc.compiles(
have_windows_gaming_input_header_code,
name: 'have Windows Gaming Input support',
)
# Microsoft Windows GameInput is provided via the Microsoft Game Development Kit (GDK)
have_gameinput_header_code = '''
#include <stdbool.h>
#define COBJMACROS
#include <gameinput.h>
int main(int argc, char **argv) { }
'''
have_gameinput_header = cc.compiles(
have_gameinput_header_code,
name: 'have GameInput support',
)
add_languages(
'cpp',
native: false,
)
cdata.set('SDL_PLATFORM_WIN32', 1)
cdata.set('SDL_THREAD_WINDOWS', 1)
cdata.set('SDL_THREAD_GENERIC_COND_SUFFIX', 1)
cdata.set('SDL_THREAD_GENERIC_RWLOCK_SUFFIX', 1)
cdata.set('SDL_LOADSO_WINDOWS', 1)
cdata.set('SDL_PROCESS_WINDOWS', 1)
cdata.set('SDL_SENSOR_WINDOWS', 1)
cdata.set('SDL_POWER_WINDOWS', 1)
cdata.set('SDL_VIDEO_RENDER_D3D12', 1)
cdata.set('SDL_GPU_VULKAN', 1)
cdata.set('SDL_GPU_D3D12', 1)
cdata.set('SDL_VIDEO_VULKAN', 1)
cdata.set('SDL_VIDEO_RENDER_VULKAN', 1)
cdata.set('SDL_VIDEO_OPENGL', 1)
cdata.set('SDL_VIDEO_OPENGL_WGL', 1)
cdata.set('SDL_VIDEO_RENDER_OGL', 1)
if have_xinput_header
cdata.set('SDL_JOYSTICK_XINPUT', 1)
cdata.set('HAVE_XINPUT', true)
endif
if have_windows_gaming_input_header
cdata.set('SDL_JOYSTICK_WGI', 1)
endif
if have_gameinput_header
cdata.set('HAVE_GAMEINPUT_H', 1)
cdata.set('SDL_JOYSTICK_GAMEINPUT', 1)
endif
cdata.set('SDL_TIMER_WINDOWS', 1)
sdl_deps += cc.find_library('version')
sdl_deps += cc.find_library('imm32')
sdl_deps += cc.find_library('setupapi')
sdl_deps += cc.find_library('winmm')
sdl_deps += cc.find_library('opengl32')
elif host_machine.subsystem() == 'macos'
cdata.set('SDL_PLATFORM_APPLE', 1)
cdata.set('SDL_THREAD_PTHREAD', 1)
cdata.set('SDL_THREAD_PTHREAD_RECURSIVE_MUTEX', 1)
cdata.set('SDL_LOADSO_DLOPEN', 1)
cdata.set('SDL_PROCESS_POSIX', 1)
cdata.set('SDL_FILESYSTEM_COCOA', 1)
cdata.set('SDL_VIDEO_DRIVER_COCOA', 1)
cdata.set('SDL_VIDEO_OPENGL_CGL', 1)
cdata.set('SDL_VIDEO_OPENGL', 1)
cdata.set('SDL_FSOPS_POSIX', 1)
cdata.set('SDL_SENSOR_DUMMY', 1)
cdata.set('SDL_POWER_MACOSX', 1)
cdata.set('SDL_VIDEO_RENDER_GPU', 1)
cdata.set('SDL_GPU_VULKAN', 1)
cdata.set('SDL_GPU_METAL', 1)
cdata.set('SDL_VIDEO_VULKAN', 1)
cdata.set('SDL_VIDEO_METAL', 1)
cdata.set('SDL_VIDEO_RENDER_VULKAN', 1)
cdata.set('SDL_TIMER_UNIX', 1)
sdl_deps += dependency(
'appleframeworks',
modules: [
'CoreFoundation',
'Cocoa',
'CoreAudio',
'CoreGraphics',
'CoreHaptics',
'GameController',
'ForceFeedback',
'IOKit',
'Foundation',
'QuartzCore',
'Metal',
'Carbon',
'UniformTypeIdentifiers',
],
)
else
error('Platform not yet supported.')
endif
if get_option('default_library') == 'both' and cc.get_argument_syntax() == 'msvc'
error('default_library=both not supported when compiling with MSVC')
endif
subdir('src')
# FIXME, this is to work around a bug in upstream headers
cdata.set('SDL_LIBDECOR_VERSION_MAJOR', 99)
cdata.set('SDL_LIBDECOR_VERSION_MINOR', 99)
cdata.set('SDL_LIBDECOR_VERSION_PATCH', 99)
configure_file(
input: 'include/build_config/SDL_build_config.h.cmake',
output: 'SDL_build_config.h',
configuration: cdata,
format: 'cmake',
)
if get_option('default_library') == 'shared'
extra_args = ['-DDLL_EXPORT']
else
extra_args = []
endif
sdl_lib = library(
'SDL3',
sources,
include_directories: ['include', 'src'],
c_args: extra_args,
dependencies: sdl_deps,
install: true,
)
sdl3_dep = declare_dependency(
include_directories: 'include',
link_with: sdl_lib,
)
meson.override_dependency('sdl3', sdl3_dep)
@@ -1 +0,0 @@
sources += files('SDL_atomic.c', 'SDL_spinlock.c')
@@ -1 +0,0 @@
sources += files('SDL_aaudio.c')
@@ -1 +0,0 @@
sources += files('SDL_alsa_audio.c')
@@ -1 +0,0 @@
sources += files('SDL_coreaudio.m')
@@ -1 +0,0 @@
sources += files('SDL_directsound.c')
@@ -1 +0,0 @@
sources += files('SDL_diskaudio.c')
@@ -1 +0,0 @@
sources += files('SDL_dspaudio.c')
@@ -1 +0,0 @@
sources += files('SDL_dummyaudio.c')
@@ -1 +0,0 @@
sources += files('SDL_jackaudio.c')
@@ -1,22 +0,0 @@
if host_machine.system() == 'windows'
cdata.set('SDL_AUDIO_DRIVER_DSOUND', 1)
# cdata.set('SDL_AUDIO_DRIVER_WASAPI', 1)
subdir('directsound')
# subdir('wasapi')
elif host_machine.system() == 'darwin'
subdir('coreaudio')
else
cdata.set('SDL_AUDIO_DRIVER_PIPEWIRE', 1)
subdir('pipewire')
endif
sources += files(
'SDL_audio.c',
'SDL_audiocvt.c',
'SDL_audiodev.c',
'SDL_audioqueue.c',
'SDL_audioresample.c',
'SDL_audiotypecvt.c',
'SDL_mixer.c',
'SDL_wave.c',
)
@@ -1 +0,0 @@
sources += files('SDL_openslES.c')
@@ -1 +0,0 @@
sources += files('SDL_pipewire.c')
@@ -1 +0,0 @@
sources += files('SDL_pulseaudio.c')
@@ -1 +0,0 @@
sources += files('SDL_qsa_audio.c')
@@ -1 +0,0 @@
sources += files('SDL_sndioaudio.c')
@@ -1 +0,0 @@
sources += files('SDL_wasapi.c')
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files('SDL_camera_dummy.c')
@@ -1 +0,0 @@
sources += files('SDL_camera_mediafoundation.c')
@@ -1,3 +0,0 @@
subdir('dummy')
sources += files('SDL_camera.c')
@@ -1 +0,0 @@
sources += files('SDL_camera_pipewire.c')
@@ -1 +0,0 @@
sources += files('SDL_camera_v4l2.c')
@@ -1 +0,0 @@
sources += files()
@@ -1,13 +0,0 @@
sources += files(
'SDL_dbus.c',
'SDL_evdev.c',
'SDL_evdev_capabilities.c',
'SDL_evdev_kbd.c',
'SDL_fcitx.c',
'SDL_ibus.c',
'SDL_ime.c',
'SDL_progressbar.c',
'SDL_system_theme.c',
'SDL_threadprio.c',
'SDL_udev.c',
)
@@ -1,10 +0,0 @@
if host_machine.system() == 'windows'
subdir('windows')
elif host_machine.system() == 'darwin'
subdir('unix')
else
subdir('unix')
subdir('linux')
endif
sources += files('SDL_core_unsupported.c')
@@ -1,28 +0,0 @@
sources += files(
'SDL_appid.c',
'SDL_fribidi.c',
'SDL_gtk.c',
'SDL_libthai.c',
'SDL_poll.c',
)
have_unix_usergroupids_code = '''
// required for GNU\Linux feature_test_macros(7)
#define _GNU_SOURCE
#include <unistd.h>
int main(int argc, char** argv) {
getresgid;
getresuid;
}
'''
have_unix_usergroupids = cc.compiles(
have_unix_usergroupids_code,
name: 'have unix effective User/Group functions support',
)
if have_unix_usergroupids
cdata.set('HAVE_GETRESGID', 1)
cdata.set('HAVE_GETRESUID', 1)
endif
@@ -1,9 +0,0 @@
sources += files(
'SDL_gameinput.cpp',
'SDL_hid.c',
'SDL_immdevice.c',
'SDL_windows.c',
'SDL_xinput.c',
'pch.c',
'pch_cpp.cpp',
)
@@ -1 +0,0 @@
sources += files('SDL_cpuinfo.c')
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files('SDL_dummydialog.c')
@@ -1,7 +0,0 @@
if host_machine.system() == 'windows'
subdir('windows')
else
subdir('unix')
endif
sources += files('SDL_dialog.c', 'SDL_dialog_utils.c')
@@ -1,6 +0,0 @@
sources += files(
'SDL_portaldialog.c',
'SDL_unixdialog.c',
'SDL_zenitydialog.c',
'SDL_zenitymessagebox.c',
)
@@ -1 +0,0 @@
sources += files('SDL_windowsdialog.c')
@@ -1 +0,0 @@
sources += files('SDL_dynapi.c')
@@ -1,19 +0,0 @@
sources += files(
'SDL_categories.c',
'SDL_clipboardevents.c',
'SDL_displayevents.c',
'SDL_dropevents.c',
'SDL_events.c',
'SDL_eventwatch.c',
'SDL_keyboard.c',
'SDL_keymap.c',
'SDL_keysym_to_keycode.c',
'SDL_keysym_to_scancode.c',
'SDL_mouse.c',
'SDL_pen.c',
'SDL_quit.c',
'SDL_scancode_tables.c',
'SDL_touch.c',
'SDL_windowevents.c',
'imKStoUCS.c',
)
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files('SDL_sysfilesystem.c', 'SDL_sysfsops.c')
@@ -1 +0,0 @@
sources += files()
@@ -1,12 +0,0 @@
if host_machine.system() == 'windows'
cdata.set('SDL_FSOPS_WINDOWS', 1)
cdata.set('SDL_FILESYSTEM_WINDOWS', 1)
subdir('windows')
else
cdata.set('SDL_FSOPS_POSIX', 1)
cdata.set('SDL_FILESYSTEM_UNIX', 1)
subdir('unix')
subdir('posix')
endif
sources += files('SDL_filesystem.c')
@@ -1 +0,0 @@
sources += files('SDL_sysfsops.c')
@@ -1 +0,0 @@
sources += files('SDL_sysfilesystem.c')
@@ -1 +0,0 @@
sources += files('SDL_sysfilesystem.c', 'SDL_sysfsops.c')
@@ -1 +0,0 @@
sources += files('SDL_gpu_d3d12.c')
@@ -1,11 +0,0 @@
if host_machine.system() == 'windows'
subdir('d3d12')
subdir('vulkan')
elif host_machine.system() == 'darwin'
subdir('metal')
subdir('vulkan')
else
subdir('vulkan')
endif
sources += files('SDL_gpu.c')
@@ -1,2 +0,0 @@
sources += files('SDL_gpu_metal.m')
@@ -1 +0,0 @@
sources += files('SDL_gpu_vulkan.c')
@@ -1 +0,0 @@
sources += files('SDL_syshaptic.c')
@@ -1 +0,0 @@
sources += files('SDL_syshaptic.c')
@@ -1 +0,0 @@
sources += files('SDL_syshaptic.c')
@@ -1,12 +0,0 @@
if host_machine.system() == 'windows'
cdata.set('SDL_HAPTIC_DINPUT', 1)
subdir('windows')
elif host_machine.system() == 'darwin'
cdata.set('SDL_HAPTIC_IOKIT', 1)
subdir('darwin')
else
cdata.set('SDL_HAPTIC_LINUX', 1)
subdir('linux')
endif
sources += files('SDL_haptic.c')
@@ -1 +0,0 @@
sources += files('SDL_dinputhaptic.c', 'SDL_windowshaptic.c')
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files('test.c')
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files('hid.c')
@@ -1 +0,0 @@
sources += files('hid.c')
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files('hid.c')
@@ -1,9 +0,0 @@
if host_machine.system() == 'windows'
subdir('windows')
elif host_machine.subsystem() == 'macos'
# subdir('mac')
else
subdir('linux')
endif
sources += files('SDL_hidapi.c')
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files()
@@ -1,4 +0,0 @@
sources += files(
# 'hid.c',
# 'hidapi_descriptor_reconstruct.c',
)
@@ -1 +0,0 @@
sources += files('pp_data_dump.c')
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files('hid_report_reconstructor_test.c')
@@ -1 +0,0 @@
sources += files('SDL_asyncio_generic.c')
@@ -1 +0,0 @@
sources += files('SDL_asyncio_liburing.c')
@@ -1,7 +0,0 @@
subdir('generic')
if host_machine.system() == 'windows'
subdir('windows')
else
endif
sources += files('SDL_asyncio.c', 'SDL_iostream.c')
@@ -1 +0,0 @@
sources += files('SDL_asyncio_windows_ioring.c')
@@ -1 +0,0 @@
sources += files('SDL_mfijoystick.m')
@@ -1 +0,0 @@
sources += files('SDL_iokitjoystick.c')
@@ -1 +0,0 @@
sources += files('SDL_sysjoystick.c')
@@ -1,3 +0,0 @@
sources += files('SDL_gameinputjoystick.cpp')
@@ -1,20 +0,0 @@
sources += files(
'SDL_hidapi_combined.c',
'SDL_hidapi_gamecube.c',
'SDL_hidapi_luna.c',
'SDL_hidapi_ps3.c',
'SDL_hidapi_ps4.c',
'SDL_hidapi_ps5.c',
'SDL_hidapi_rumble.c',
'SDL_hidapi_shield.c',
'SDL_hidapi_stadia.c',
'SDL_hidapi_steam.c',
'SDL_hidapi_steam_hori.c',
'SDL_hidapi_steamdeck.c',
'SDL_hidapi_switch.c',
'SDL_hidapi_wii.c',
'SDL_hidapi_xbox360.c',
'SDL_hidapi_xbox360w.c',
'SDL_hidapi_xboxone.c',
'SDL_hidapijoystick.c',
)
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files('SDL_sysjoystick.c')
@@ -1,24 +0,0 @@
if host_machine.system() == 'windows'
cdata.set('SDL_JOYSTICK_DINPUT', 1)
subdir('hidapi')
subdir('windows')
subdir('gdk')
elif host_machine.system() == 'darwin'
cdata.set('SDL_JOYSTICK_IOKIT', 1)
cdata.set('SDL_JOYSTICK_MFI', 1)
subdir('apple')
subdir('darwin')
else
cdata.set('SDL_JOYSTICK_LINUX', 1)
subdir('linux')
endif
subdir('virtual')
cdata.set('SDL_JOYSTICK_VIRTUAL', 1)
sources += files(
'SDL_gamepad.c',
'SDL_joystick.c',
'SDL_steam_virtual_gamepad.c',
'controller_type.c',
)
@@ -1 +0,0 @@
sources += files('SDL_virtualjoystick.c')
@@ -1,7 +0,0 @@
sources += files(
'SDL_dinputjoystick.c',
'SDL_rawinputjoystick.c',
'SDL_windows_gaming_input.c',
'SDL_windowsjoystick.c',
'SDL_xinputjoystick.c',
)
@@ -1,27 +0,0 @@
sources += files(
'e_atan2.c',
'e_exp.c',
'e_fmod.c',
'e_log.c',
'e_log10.c',
'e_pow.c',
'e_rem_pio2.c',
'e_sqrt.c',
'k_cos.c',
'k_rem_pio2.c',
'k_sin.c',
'k_tan.c',
's_atan.c',
's_copysign.c',
's_cos.c',
's_fabs.c',
's_floor.c',
's_isinf.c',
's_isinff.c',
's_isnan.c',
's_isnanf.c',
's_modf.c',
's_scalbn.c',
's_sin.c',
's_tan.c',
)
@@ -1 +0,0 @@
sources += files('SDL_sysloadso.c')
@@ -1 +0,0 @@
sources += files('SDL_sysloadso.c')
@@ -1,5 +0,0 @@
if host_machine.system() == 'windows'
subdir('windows')
else
subdir('dlopen')
endif
@@ -1 +0,0 @@
sources += files('SDL_sysloadso.c')
@@ -1 +0,0 @@
sources += files('SDL_syslocale.c')
@@ -1 +0,0 @@
sources += files()
@@ -1,9 +0,0 @@
sources += files('SDL_locale.c')
if host_machine.system() == 'windows'
subdir('windows')
elif host_machine.system() == 'linux' or host_machine.system() == 'darwin'
subdir('unix')
else
error('Platform not supported yet.')
endif
@@ -1 +0,0 @@
sources += files('SDL_syslocale.c')
@@ -1 +0,0 @@
sources += files('SDL_syslocale.c')
@@ -1 +0,0 @@
sources += files()
@@ -1 +0,0 @@
sources += files('SDL_sysmain_callbacks.c')
@@ -1 +0,0 @@
sources += files()

Some files were not shown because too many files have changed in this diff Show More