Skip to content

Commit

Permalink
update SDL3 to libsdl-org/SDL@186c6e5
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Oct 18, 2024
1 parent 8c52dce commit 7ca4002
Show file tree
Hide file tree
Showing 224 changed files with 8,865 additions and 6,441 deletions.
1 change: 1 addition & 0 deletions libs/SDL3/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ cmake-build-*
.DS_Store
xcuserdata
*.xcworkspace
Xcode/build.xcconfig

# for Visual Studio Code
.vscode/
Expand Down
51 changes: 32 additions & 19 deletions libs/SDL3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
endif()

# See docs/release_checklist.md
project(SDL3 LANGUAGES C VERSION "3.1.3")
project(SDL3 LANGUAGES C VERSION "3.1.5")

if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
set(SDL3_SUBPROJECT OFF)
Expand Down Expand Up @@ -1042,6 +1042,8 @@ if(SDL_LIBC)
cmake_pop_check_state()

if(NOT WINDOWS)
check_symbol_exists(fdatasync "unistd.h" HAVE_FDATASYNC)
check_symbol_exists(gethostname "unistd.h" HAVE_GETHOSTNAME)
check_symbol_exists(getpagesize "unistd.h" HAVE_GETPAGESIZE)
check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
check_symbol_exists(setjmp "setjmp.h" HAVE_SETJMP)
Expand Down Expand Up @@ -1415,13 +1417,20 @@ if(ANDROID)
set(javadoc_index_html "${javadocdir}/index.html")
add_custom_command(
OUTPUT "${javadoc_index_html}"
COMMAND ${CMAKE_COMMAND} -E rm -rf "${javadocdir}"
COMMAND ${CMAKE_COMMAND} -E rm -rf "${javadocdir}" "${javadocjar}"
COMMAND ${Java_JAVADOC_EXECUTABLE} -encoding utf8 -d "${javadocdir}"
-classpath "${path_android_jar}"
-author -use -version ${SDL_JAVA_SOURCES}
DEPENDS ${SDL_JAVA_SOURCES} "${path_android_jar}"
)
add_custom_target(SDL3-javadoc ALL DEPENDS "${javadoc_index_html}")
add_custom_command(
OUTPUT "${javadocjar}"
COMMAND ${Java_JAR_EXECUTABLE} -c -f "${javadocjar}"
-C "${javadocdir}" *
WORKING_DIRECTORY "${javadocdir}"
DEPENDS ${javadoc_index_html}
)
add_custom_target(SDL3-javadoc ALL DEPENDS "${javadoc_index_html}" "${javadocjar}")
set_property(TARGET SDL3-javadoc PROPERTY OUTPUT_DIR "${javadocdir}")
endif()
endif()
Expand Down Expand Up @@ -1717,7 +1726,6 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
sdl_sources(
"${SDL3_SOURCE_DIR}/src/core/linux/SDL_evdev_capabilities.c"
"${SDL3_SOURCE_DIR}/src/core/linux/SDL_threadprio.c"
"${SDL3_SOURCE_DIR}/src/core/linux/SDL_sandbox.c"
)

# src/core/unix/*.c is included in a generic if(UNIX) section, elsewhere.
Expand Down Expand Up @@ -2518,7 +2526,9 @@ elseif(VITA)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/vita/*.c")
set(HAVE_SDL_FILESYSTEM TRUE)

# !!! FIXME: do we need a FSops implementation for this?
set(SDL_FSOPS_POSIX 1)
sdl_sources("${SDL3_SOURCE_DIR}/src/filesystem/posix/SDL_sysfsops.c")
set(HAVE_SDL_FSOPS TRUE)

if(SDL_JOYSTICK)
set(SDL_JOYSTICK_VITA 1)
Expand Down Expand Up @@ -2560,6 +2570,12 @@ elseif(VITA)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/sensor/vita/*.c")
endif()

if(SDL_CAMERA)
set(SDL_CAMERA_DRIVER_VITA 1)
set(HAVE_CAMERA TRUE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/camera/vita/*.c")
endif()

if(SDL_VIDEO)
set(SDL_VIDEO_DRIVER_VITA 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/vita/*.c")
Expand Down Expand Up @@ -2640,6 +2656,7 @@ elseif(VITA)
SceMotion_stub
ScePower_stub
SceProcessmgr_stub
SceCamera_stub
)
endif()

Expand Down Expand Up @@ -3044,21 +3061,17 @@ foreach(_hdr IN LISTS SDL3_INCLUDE_FILES)
endif()
endforeach()

set(SDL_REVISION "" CACHE STRING "Custom SDL revision (overrides SDL_REVISION_SUFFIX)")
if(NOT SDL_REVISION)
set(SDL_REVISION_SUFFIX "" CACHE STRING "Suffix for the SDL revision")
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt")
# If VERSION.txt exists, it contains the SDL version
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt" SDL_REVISION_CENTER)
string(STRIP "${SDL_REVISION_CENTER}" SDL_REVISION_CENTER)
# If REVISION.txt exists, then we are building from a SDL release.
# SDL_revision.h(.cmake) in source releases have SDL_REVISION baked into them.
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/REVISION.txt")
set(SDL_REVISION "" CACHE STRING "Custom SDL revision")
if(SDL_REVISION)
set(SDL_REVISION_CENTER "${SDL_VERSION_MAJOR}.${SDL_VERSION_MINOR}.${SDL_VERSION_MICRO}-${SDL_REVISION}")
else()
# If VERSION does not exist, use git to calculate a version
# If SDL_REVISION is not overrided, use git to describe
git_describe(SDL_REVISION_CENTER)
if(NOT SDL_REVISION_CENTER)
set(SDL_REVISION_CENTER "${SDL3_VERSION}-no-vcs")
endif()
endif()
set(SDL_REVISION "SDL-${SDL_REVISION_CENTER}${SDL_REVISION_SUFFIX}")
set(SDL_REVISION "SDL3-${SDL_REVISION_CENTER}")
endif()

execute_process(COMMAND "${CMAKE_COMMAND}" -E make_directory "${SDL3_BINARY_DIR}/include/SDL3")
Expand Down Expand Up @@ -3645,7 +3658,7 @@ if(NOT SDL_DISABLE_INSTALL)
)
endif()
if(TARGET SDL3-javasources)
install(FILES "${SDL3_BINARY_DIR}/SDL3-${SDL3_VERSION}-sources.jar"
install(FILES "${SDL3_BINARY_DIR}/SDL3-${SDL3_VERSION}-sources.jar"
DESTINATION "${SDL_INSTALL_JAVADIR}/SDL3")
endif()
endif()
Expand All @@ -3659,7 +3672,7 @@ if(NOT SDL_DISABLE_INSTALL)
)
if(TARGET SDL3-javadoc)
set(SDL_INSTALL_JAVADOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/javadoc" CACHE PATH "Path where to install SDL3 javadoc")
install(DIRECTORY "${SDL3_BINARY_DIR}/docs/javadoc/"
install(FILES "${SDL3_BINARY_DIR}/SDL3-${SDL3_VERSION}-javadoc.jar"
DESTINATION "${SDL_INSTALL_JAVADOCDIR}/SDL3")
endif()
endif()
Expand Down
4 changes: 2 additions & 2 deletions libs/SDL3/Xcode/SDL/Info-Framework.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.1.3</string>
<string>3.1.5</string>
<key>CFBundleSignature</key>
<string>SDLX</string>
<key>CFBundleVersion</key>
<string>3.1.3</string>
<string>3.1.5</string>
</dict>
</plist>
30 changes: 19 additions & 11 deletions libs/SDL3/Xcode/SDL/SDL.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 55;
objectVersion = 54;
objects = {

/* Begin PBXAggregateTarget section */
Expand Down Expand Up @@ -43,7 +43,7 @@
000080903BC03006F24E0000 /* SDL_filesystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 00002B010DB1A70931C20000 /* SDL_filesystem.c */; };
000095FA1BDE436CF3AF0000 /* SDL_time.c in Sources */ = {isa = PBXBuildFile; fileRef = 0000641A9BAC11AB3FBE0000 /* SDL_time.c */; };
000098E9DAA43EF6FF7F0000 /* SDL_camera.c in Sources */ = {isa = PBXBuildFile; fileRef = 0000035D38C3899C7EFD0000 /* SDL_camera.c */; };
0000A4DA2F45A31DC4F00000 /* SDL_sysmain_callbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 0000BB287BA0A0178C1A0000 /* SDL_sysmain_callbacks.m */; platformFilters = (ios, maccatalyst, macos, tvos, watchos, ); };
0000A4DA2F45A31DC4F00000 /* SDL_sysmain_callbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 0000BB287BA0A0178C1A0000 /* SDL_sysmain_callbacks.m */; };
0000D5B526B85DE7AB1C0000 /* SDL_cocoapen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0000CCA310B73A7B59910000 /* SDL_cocoapen.m */; };
007317A40858DECD00B2BC32 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179D0858DECD00B2BC32 /* Cocoa.framework */; platformFilters = (macos, ); };
007317A60858DECD00B2BC32 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179F0858DECD00B2BC32 /* IOKit.framework */; platformFilters = (ios, maccatalyst, macos, ); };
Expand Down Expand Up @@ -421,8 +421,8 @@
F37A8E1A28405AA100C38E95 /* CMake in Resources */ = {isa = PBXBuildFile; fileRef = F37A8E1928405AA100C38E95 /* CMake */; };
F37E184E2B8C097D0098C111 /* SDL_camera.h in Headers */ = {isa = PBXBuildFile; fileRef = 000084ED0A56E3ED52F90000 /* SDL_camera.h */; settings = {ATTRIBUTES = (Public, ); }; };
F37E18522BA50E760098C111 /* SDL_dialog.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E18512BA50E750098C111 /* SDL_dialog.h */; settings = {ATTRIBUTES = (Public, ); }; };
F37E18582BA50F3B0098C111 /* SDL_cocoadialog.m in Sources */ = {isa = PBXBuildFile; fileRef = F37E18572BA50F3B0098C111 /* SDL_cocoadialog.m */; platformFilters = (macos, ); };
F37E185A2BA50F450098C111 /* SDL_dummydialog.c in Sources */ = {isa = PBXBuildFile; fileRef = F37E18592BA50F450098C111 /* SDL_dummydialog.c */; platformFilters = (ios, maccatalyst, tvos, xros, ); };
F37E18582BA50F3B0098C111 /* SDL_cocoadialog.m in Sources */ = {isa = PBXBuildFile; fileRef = F37E18572BA50F3B0098C111 /* SDL_cocoadialog.m */; };
F37E185A2BA50F450098C111 /* SDL_dummydialog.c in Sources */ = {isa = PBXBuildFile; fileRef = F37E18592BA50F450098C111 /* SDL_dummydialog.c */; };
F37E185C2BAA3EF90098C111 /* SDL_time.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E185B2BAA3EF90098C111 /* SDL_time.h */; settings = {ATTRIBUTES = (Public, ); }; };
F37E18622BAA40090098C111 /* SDL_sysfilesystem.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E18612BAA40090098C111 /* SDL_sysfilesystem.h */; };
F37E18642BAA40670098C111 /* SDL_time_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F37E18632BAA40670098C111 /* SDL_time_c.h */; };
Expand Down Expand Up @@ -1049,6 +1049,7 @@
F3F528C82C29E1C300E6CC26 /* s_isnan.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = s_isnan.c; sourceTree = "<group>"; };
F3F528C92C29E1C300E6CC26 /* s_modf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = s_modf.c; sourceTree = "<group>"; };
F3F528CA2C29E1C300E6CC26 /* s_isinff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = s_isinff.c; sourceTree = "<group>"; };
F3F7BE3B2CBD79D200C984AF /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = config.xcconfig; sourceTree = "<group>"; };
F3F7D8AA2933074900816151 /* SDL_audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_audio.h; path = SDL3/SDL_audio.h; sourceTree = "<group>"; };
F3F7D8AB2933074900816151 /* SDL_platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_platform.h; path = SDL3/SDL_platform.h; sourceTree = "<group>"; };
F3F7D8AC2933074900816151 /* SDL_stdinc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_stdinc.h; path = SDL3/SDL_stdinc.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1314,6 +1315,7 @@
0867D691FE84028FC02AAC07 /* SDLFramework */ = {
isa = PBXGroup;
children = (
F3F7BE3B2CBD79D200C984AF /* config.xcconfig */,
F5A2EF3900C6A39A01000001 /* BUGS.txt */,
F59C70FC00D5CB5801000001 /* pkg-support */,
0153844A006D81B07F000001 /* Public Headers */,
Expand Down Expand Up @@ -2793,7 +2795,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -ex\n\nmkdir -p build/dmg-tmp/share/cmake/SDL3\ncp -a build/SDL3.xcframework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\ncp pkg-support/resources/share/cmake/SDL3/sdl3-config.cmake build/dmg-tmp/share/cmake/SDL3\ncp pkg-support/resources/share/cmake/SDL3/sdl3-config-version.cmake build/dmg-tmp/share/cmake/SDL3\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL3 -srcfolder build/dmg-tmp build/SDL3.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
shellScript = "set -ex\n\nmkdir -p build/dmg-tmp/share/cmake/SDL3\ncp -a build/SDL3.xcframework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\ncp pkg-support/share/cmake/SDL3/SDL3Config.cmake build/dmg-tmp/share/cmake/SDL3\ncp pkg-support/share/cmake/SDL3/SDL3ConfigVersion.cmake build/dmg-tmp/share/cmake/SDL3\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL3 -srcfolder build/dmg-tmp build/SDL3.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
};
F3B38CF0296F63D1005DA6D3 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -3079,8 +3081,8 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
DEPLOYMENT_POSTPROCESSING = YES;
DYLIB_COMPATIBILITY_VERSION = 104.0.0;
DYLIB_CURRENT_VERSION = 104.0.0;
DYLIB_COMPATIBILITY_VERSION = 106.0.0;
DYLIB_CURRENT_VERSION = 106.0.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_ALTIVEC_EXTENSIONS = YES;
Expand All @@ -3089,6 +3091,7 @@
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 3;
GCC_PREPROCESSOR_DEFINITIONS = "$(CONFIG_PREPROCESSOR_DEFINITIONS)";
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
HEADER_SEARCH_PATHS = (
../../include,
Expand All @@ -3111,7 +3114,8 @@
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 3.1.3;
MARKETING_VERSION = 3.1.5;
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
PRODUCT_NAME = SDL3;
STRIP_STYLE = "non-global";
Expand All @@ -3124,6 +3128,7 @@
};
00CFA622106A567900758660 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F3F7BE3B2CBD79D200C984AF /* config.xcconfig */;
buildSettings = {
CLANG_LINK_OBJC_RUNTIME = NO;
OTHER_LDFLAGS = "-liconv";
Expand All @@ -3137,8 +3142,8 @@
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
DYLIB_COMPATIBILITY_VERSION = 104.0.0;
DYLIB_CURRENT_VERSION = 104.0.0;
DYLIB_COMPATIBILITY_VERSION = 106.0.0;
DYLIB_CURRENT_VERSION = 106.0.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand All @@ -3147,6 +3152,7 @@
GCC_ENABLE_SSE3_EXTENSIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = "$(CONFIG_PREPROCESSOR_DEFINITIONS)";
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
HEADER_SEARCH_PATHS = (
../../include,
Expand All @@ -3169,8 +3175,9 @@
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 3.1.3;
MARKETING_VERSION = 3.1.5;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
PRODUCT_NAME = SDL3;
STRIP_INSTALLED_PRODUCT = NO;
Expand All @@ -3183,6 +3190,7 @@
};
00CFA628106A568900758660 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F3F7BE3B2CBD79D200C984AF /* config.xcconfig */;
buildSettings = {
CLANG_LINK_OBJC_RUNTIME = NO;
OTHER_LDFLAGS = "-liconv";
Expand Down
12 changes: 12 additions & 0 deletions libs/SDL3/Xcode/SDL/config.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// config.xcconfig
//

// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

// Include any optional config for this build
#include? "build.xcconfig"

CONFIG_PREPROCESSOR_DEFINITIONS = $(inherited) $(SDL_PREPROCESSOR_DEFINITIONS)
CONFIG_FRAMEWORK_LDFLAGS = $(inherited)
2 changes: 1 addition & 1 deletion libs/SDL3/Xcode/SDL/pkg-support/SDL.info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Title SDL 3.1.3
Title SDL 3.1.5
Version 1
Description SDL Library for macOS (http://www.libsdl.org)
DefaultLocation /Library/Frameworks
Expand Down
8 changes: 8 additions & 0 deletions libs/SDL3/Xcode/SDL/pkg-support/build.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// build.xcconfig
//

// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

SDL_PREPROCESSOR_DEFINITIONS = SDL_VENDOR_INFO=\"libsdl.org\"

This file was deleted.

Loading

0 comments on commit 7ca4002

Please sign in to comment.