First pass at changing SDL 2.0 to SDL 3.0

This commit is contained in:
Sam Lantinga 2022-11-21 20:28:58 -08:00
parent 0bfeed061b
commit 2c4159b99a
146 changed files with 2633 additions and 2635 deletions

View File

@ -16,7 +16,7 @@ indent_style = space
indent_size = 4
indent_style = space
[{CMakeLists.txt,sdl2-config*.cmake.in,cmake/*.cmake}]
[{CMakeLists.txt,sdl3-config*.cmake.in,cmake/*.cmake}]
indent_size = 2
indent_style = space

View File

@ -8,7 +8,7 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := SDL2
LOCAL_MODULE := SDL3
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
@ -97,9 +97,9 @@ include $(BUILD_SHARED_LIBRARY)
#
###########################
LOCAL_MODULE := SDL2_static
LOCAL_MODULE := SDL3_static
LOCAL_MODULE_FILENAME := libSDL2
LOCAL_MODULE_FILENAME := libSDL3
LOCAL_LDLIBS :=
@ -120,9 +120,9 @@ include $(CLEAR_VARS)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_MODULE := SDL2_main
LOCAL_MODULE := SDL3_main
LOCAL_MODULE_FILENAME := libSDL2main
LOCAL_MODULE_FILENAME := libSDL3main
include $(BUILD_STATIC_LIBRARY)

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@ datarootdir = @datarootdir@
datadir = @datadir@
auxdir = @ac_aux_dir@
distpath = $(srcdir)/..
distdir = SDL2-@SDL_VERSION@
distdir = SDL3-@SDL_VERSION@
distfile = $(distdir).tar.gz
@SET_MAKE@
@ -34,25 +34,25 @@ LINKER = @LINKER@
LIBTOOLLINKERTAG = @LIBTOOLLINKERTAG@
SDL_VENDOR_INFO = @SDL_VENDOR_INFO@
TARGET = libSDL2.la
TARGET = libSDL3.la
OBJECTS = @OBJECTS@
GEN_HEADERS = @GEN_HEADERS@
GEN_OBJECTS = @GEN_OBJECTS@
VERSION_OBJECTS = @VERSION_OBJECTS@
SDLMAIN_TARGET = libSDL2main.la
SDLMAIN_TARGET = libSDL3main.la
SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
SDLTEST_TARGET = libSDL2_test.la
SDLTEST_TARGET = libSDL3_test.la
SDLTEST_OBJECTS = @SDLTEST_OBJECTS@
WAYLAND_SCANNER = @WAYLAND_SCANNER@
WAYLAND_SCANNER_CODE_MODE = @WAYLAND_SCANNER_CODE_MODE@
INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
INSTALL_SDL3_CONFIG = @INSTALL_SDL3_CONFIG@
SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* mingw sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake.in src test VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
GEN_DIST = SDL2.spec
SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* mingw sdl3-config.cmake.in sdl3-config-version.cmake.in sdl3-config.in sdl3.m4 sdl3.pc.in SDL3.spec.in SDL3Config.cmake.in src test VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
GEN_DIST = SDL3.spec
ifneq ($V,1)
RUN_CMD_AR = @echo " AR " $@;
@ -168,21 +168,21 @@ $(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
install: all install-bin install-hdrs install-lib install-data
install-bin:
ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
ifeq ($(INSTALL_SDL3_CONFIG),TRUE)
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
$(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config
$(INSTALL) -m 755 sdl3-config $(DESTDIR)$(bindir)/sdl3-config
endif
install-hdrs: update-revision
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL3
for file in $(HDRS) $(SDLTEST_HDRS); do \
$(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL2/$$file; \
$(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL3/$$file; \
done
$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL2/SDL_config.h
$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL3/SDL_config.h
if test -f include/SDL_revision.h; then \
$(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
$(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL3/SDL_revision.h; \
else \
$(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
$(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL3/SDL_revision.h; \
fi
install-lib: $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
@ -192,34 +192,34 @@ install-lib: $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLT
$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
install-data:
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
$(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
$(INSTALL) -m 644 $(srcdir)/sdl3.m4 $(DESTDIR)$(datadir)/aclocal/sdl3.m4
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig
ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2
$(INSTALL) -m 644 sdl2-config.cmake $(DESTDIR)$(libdir)/cmake/SDL2
$(INSTALL) -m 644 sdl2-config-version.cmake $(DESTDIR)$(libdir)/cmake/SDL2
$(INSTALL) -m 644 sdl3.pc $(DESTDIR)$(libdir)/pkgconfig
ifeq ($(INSTALL_SDL3_CONFIG),TRUE)
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL3
$(INSTALL) -m 644 sdl3-config.cmake $(DESTDIR)$(libdir)/cmake/SDL3
$(INSTALL) -m 644 sdl3-config-version.cmake $(DESTDIR)$(libdir)/cmake/SDL3
endif
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
uninstall-bin:
rm -f $(DESTDIR)$(bindir)/sdl2-config
rm -f $(DESTDIR)$(bindir)/sdl3-config
uninstall-hdrs:
for file in $(HDRS) $(SDLTEST_HDRS); do \
rm -f $(DESTDIR)$(includedir)/SDL2/$$file; \
rm -f $(DESTDIR)$(includedir)/SDL3/$$file; \
done
rm -f $(DESTDIR)$(includedir)/SDL2/SDL_config.h
rm -f $(DESTDIR)$(includedir)/SDL2/SDL_revision.h
-rmdir $(DESTDIR)$(includedir)/SDL2
rm -f $(DESTDIR)$(includedir)/SDL3/SDL_config.h
rm -f $(DESTDIR)$(includedir)/SDL3/SDL_revision.h
-rmdir $(DESTDIR)$(includedir)/SDL3
uninstall-lib:
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
rm -f $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
uninstall-data:
rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config.cmake
rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config-version.cmake
rm -f $(DESTDIR)$(datadir)/aclocal/sdl3.m4
rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl3.pc
rm -f $(DESTDIR)$(libdir)/cmake/SDL3/sdl3-config.cmake
rm -f $(DESTDIR)$(libdir)/cmake/SDL3/sdl3-config-version.cmake
clean:
rm -rf $(objects)
@ -227,7 +227,7 @@ clean:
if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
distclean: clean
rm -f Makefile Makefile.rules sdl2-config
rm -f Makefile Makefile.rules sdl3-config
rm -f config.status config.cache config.log libtool
rm -rf $(srcdir)/autom4te*
find $(srcdir) \( \

View File

@ -5,8 +5,8 @@ CFLAGS = -g -O2 $(INCLUDE)
AR = ar
RANLIB = ranlib
TARGET = libSDL2.a
TESTTARGET = libSDL2_test.a
TARGET = libSDL3.a
TESTTARGET = libSDL3_test.a
SOURCES = \
src/*.c \

View File

@ -1,4 +1,4 @@
# Open Watcom makefile to build SDL2.dll for OS/2
# Open Watcom makefile to build SDL3.dll for OS/2
# wmake -f Makefile.os2
#
# If you have GNU libiconv installed (iconv2.dll), you
@ -12,9 +12,9 @@
#
# To error out upon warnings: wmake -f Makefile.os2 ENABLE_WERROR=1
LIBNAME = SDL2
MAJOR_VERSION = 2
MINOR_VERSION = 26
LIBNAME = SDL3
MAJOR_VERSION = 3
MINOR_VERSION = 0
MICRO_VERSION = 0
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
DESCRIPTION = Simple DirectMedia Layer 2
@ -30,8 +30,8 @@ LNKFILE = $(LIBNAME).lnk
INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
INCPATH+= -Iinclude
LIBM = SDL2libm.lib
TLIB = SDL2test.lib
LIBM = SDL3libm.lib
TLIB = SDL3test.lib
LIBS = mmpm2.lib $(LIBM)
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
# Debug options:
@ -162,7 +162,7 @@ $(LIBICONV_LIB): "src/core/os2/iconv2.lbc"
@echo * Creating: $@
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ @$<
# SDL2libm
# SDL3libm
MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.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_scalbn.c s_sin.c s_tan.c
@ -216,7 +216,7 @@ $(LIBM): build_libm $(MOBJS)
@echo * Creating: $@
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
# SDL2test
# SDL3test
TSRCS = SDL_test_assert.c SDL_test_common.c SDL_test_compare.c &
SDL_test_crc32.c SDL_test_font.c SDL_test_fuzzer.c SDL_test_harness.c &
SDL_test_imageBlit.c SDL_test_imageBlitBlend.c SDL_test_imageFace.c &

View File

@ -10,7 +10,7 @@ CFLAGS = -O3 -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp
-mfpu=neon -ftree-vectorize -ffast-math -fomit-frame-pointer -fno-strict-aliasing -fsingle-precision-constant \
-I./include -I$(PNDSDK)/usr/include
TARGET = libSDL2.a
TARGET = libSDL3.a
SOURCES =
./src/*.c \

View File

@ -1,11 +1,11 @@
# Open Watcom makefile to build SDL2.dll for Win32
# Open Watcom makefile to build SDL3.dll for Win32
# wmake -f Makefile.w32
#
# To error out upon warnings: wmake -f Makefile.w32 ENABLE_WERROR=1
LIBNAME = SDL2
MAJOR_VERSION = 2
MINOR_VERSION = 26
LIBNAME = SDL3
MAJOR_VERSION = 3
MINOR_VERSION = 0
MICRO_VERSION = 0
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
@ -19,8 +19,8 @@ INCPATH = -I"$(%WATCOM)/h/nt" -I"$(%WATCOM)/h/nt/directx" -I"$(%WATCOM)/h"
INCPATH+= -Iinclude
INCPATH+= -I"src/video/khronos"
LIBM = SDL2libm.lib
TLIB = SDL2test.lib
LIBM = SDL3libm.lib
TLIB = SDL3test.lib
# user32.lib, gdi32.lib, ole32.lib and oleaut32.lib are actually
# among the default libraries in wlink.lnk for nt_dll linkage...
LIBS = user32.lib gdi32.lib winmm.lib imm32.lib ole32.lib oleaut32.lib shell32.lib setupapi.lib version.lib uuid.lib dxguid.lib $(LIBM)
@ -147,7 +147,7 @@ SDL_RLEaccel.obj: SDL_RLEaccel.c
SDL_malloc.obj: SDL_malloc.c
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
# SDL2libm
# SDL3libm
MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.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_scalbn.c s_sin.c s_tan.c
@ -201,7 +201,7 @@ $(LIBM): build_libm $(MOBJS)
@echo * Creating: $@
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
# SDL2test
# SDL3test
TSRCS = SDL_test_assert.c SDL_test_common.c SDL_test_compare.c &
SDL_test_crc32.c SDL_test_font.c SDL_test_fuzzer.c SDL_test_harness.c &
SDL_test_imageBlit.c SDL_test_imageBlitBlend.c SDL_test_imageFace.c &
@ -257,7 +257,7 @@ $(LNKFILE): Makefile.w32
@for %i in ($(OBJS)) do @%append $@ FILE %i
@for %i in ($(LIBS)) do @%append $@ LIB %i
@%append $@ OPTION RESOURCE=$(RCOBJS)
@%append $@ EXPORT=src/dynapi/SDL2.exports
@%append $@ EXPORT=src/dynapi/SDL3.exports
@%append $@ OPTION QUIET
@%append $@ OPTION IMPF=$(EXPFILE)
@%append $@ OPTION MAP=$(LIBHOME)/$^&.map

View File

@ -1,5 +1,5 @@
# Simple DirectMedia Layer (SDL) Version 2.0
# Simple DirectMedia Layer (SDL) Version 3.0
https://www.libsdl.org/

View File

@ -1,65 +0,0 @@
# sdl2 cmake project-config input for CMakeLists.txt script
include(FeatureSummary)
set_package_properties(SDL2 PROPERTIES
URL "https://www.libsdl.org/"
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
)
@PACKAGE_INIT@
set(SDL2_FOUND TRUE)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
set(SDL2_SDL2_FOUND TRUE)
endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
if(ANDROID)
enable_language(CXX)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
set(SDL2_SDL2-static_FOUND TRUE)
endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
set(SDL2_SDL2main_FOUND TRUE)
endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake")
set(SDL2_SDL2test_FOUND TRUE)
endif()
check_required_components(SDL2)
# Create SDL2::SDL2 alias for static-only builds
if(TARGET SDL2::SDL2-static AND NOT TARGET SDL2::SDL2)
if(CMAKE_VERSION VERSION_LESS "3.18")
# FIXME: Aliasing local targets is not supported on CMake < 3.18, so make it global.
add_library(SDL2::SDL2 INTERFACE IMPORTED)
set_target_properties(SDL2::SDL2 PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2-static")
else()
add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static)
endif()
endif()
# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
set(SDL2_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
set(SDL2_EXEC_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
set(SDL2_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2")
set(SDL2_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@;@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2")
set(SDL2_BINDIR "@PACKAGE_CMAKE_INSTALL_FULL_BINDIR@")
set(SDL2_LIBDIR "@PACKAGE_CMAKE_INSTALL_FULL_LIBDIR@")
set(SDL2_LIBRARIES SDL2::SDL2)
set(SDL2_STATIC_LIBRARIES SDL2::SDL2-static)
set(SDL2_STATIC_PRIVATE_LIBS)
set(SDL2MAIN_LIBRARY)
if(TARGET SDL2::SDL2main)
set(SDL2MAIN_LIBRARY SDL2::SDL2main)
list(INSERT SDL2_LIBRARIES 0 SDL2::SDL2main)
list(INSERT SDL2_STATIC_LIBRARIES 0 SDL2::SDL2main)
endif()
set(SDL2TEST_LIBRARY SDL2::SDL2test)

View File

@ -1,5 +1,5 @@
Summary: Simple DirectMedia Layer
Name: SDL2
Name: SDL3
Version: @SDL_VERSION@
Release: 2
Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
@ -9,7 +9,7 @@ Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Prefix: %{_prefix}
%ifos linux
Provides: libSDL2-2.0.so.0
Provides: libSDL3-3.0.so.0
%endif
%define __defattr %defattr(-,root,root)
@ -75,7 +75,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/lib*.%{__soext}
%{_includedir}/*/*.h
%{_libdir}/cmake/*
%{_libdir}/pkgconfig/SDL2/*
%{_libdir}/pkgconfig/SDL3/*
%{_datadir}/aclocal/*
%changelog

65
SDL3Config.cmake.in Normal file
View File

@ -0,0 +1,65 @@
# SDL cmake project-config input for CMakeLists.txt script
include(FeatureSummary)
set_package_properties(SDL3 PROPERTIES
URL "https://www.libsdl.org/"
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
)
@PACKAGE_INIT@
set(SDL3_FOUND TRUE)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3Targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL3Targets.cmake")
set(SDL3_SDL3_FOUND TRUE)
endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3staticTargets.cmake")
if(ANDROID)
enable_language(CXX)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/SDL3staticTargets.cmake")
set(SDL3_SDL3-static_FOUND TRUE)
endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3mainTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL3mainTargets.cmake")
set(SDL3_SDL3main_FOUND TRUE)
endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3testTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL3testTargets.cmake")
set(SDL3_SDL3test_FOUND TRUE)
endif()
check_required_components(SDL3)
# Create SDL3::SDL3 alias for static-only builds
if(TARGET SDL3::SDL3-static AND NOT TARGET SDL3::SDL3)
if(CMAKE_VERSION VERSION_LESS "3.18")
# FIXME: Aliasing local targets is not supported on CMake < 3.18, so make it global.
add_library(SDL3::SDL3 INTERFACE IMPORTED)
set_target_properties(SDL3::SDL3 PROPERTIES INTERFACE_LINK_LIBRARIES "SDL3::SDL3-static")
else()
add_library(SDL3::SDL3 ALIAS SDL3::SDL3-static)
endif()
endif()
# For compatibility with autotools sdl3-config.cmake, provide SDL3_* variables.
set(SDL3_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
set(SDL3_EXEC_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
set(SDL3_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL3")
set(SDL3_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@;@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL3")
set(SDL3_BINDIR "@PACKAGE_CMAKE_INSTALL_FULL_BINDIR@")
set(SDL3_LIBDIR "@PACKAGE_CMAKE_INSTALL_FULL_LIBDIR@")
set(SDL3_LIBRARIES SDL3::SDL3)
set(SDL3_STATIC_LIBRARIES SDL3::SDL3-static)
set(SDL3_STATIC_PRIVATE_LIBS)
set(SDL3MAIN_LIBRARY)
if(TARGET SDL3::SDL3main)
set(SDL3MAIN_LIBRARY SDL3::SDL3main)
list(INSERT SDL3_LIBRARIES 0 SDL3::SDL3main)
list(INSERT SDL3_STATIC_LIBRARIES 0 SDL3::SDL3main)
endif()
set(SDL3TEST_LIBRARY SDL3::SDL3test)

View File

@ -4,13 +4,13 @@ VisualStudioVersion = 17.1.32414.318
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D69D5741-611F-4E14-8541-1FEE94F50B5A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3", "SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2main", "SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3main", "SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "tests\testsprite2\testsprite2.vcxproj", "{40FB7794-D3C3-4CFE-BCF4-A80C96635682}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2test", "SDLtest\SDLtest.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3test", "SDLtest\SDLtest.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests\testgamecontroller\testgamecontroller.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08305}"
EndProject

View File

@ -27,7 +27,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>SDL2</ProjectName>
<ProjectName>SDL3</ProjectName>
<ProjectGuid>{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}</ProjectGuid>
<RootNamespace>SDL</RootNamespace>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

View File

@ -30,7 +30,7 @@
<ClCompile Include="..\..\src\main\gdk\SDL_gdk_main.c" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>SDL2main</ProjectName>
<ProjectName>SDL3main</ProjectName>
<ProjectGuid>{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}</ProjectGuid>
<RootNamespace>SDLmain</RootNamespace>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
@ -208,4 +208,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -27,7 +27,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>SDL2test</ProjectName>
<ProjectName>SDL3test</ProjectName>
<ProjectGuid>{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}</ProjectGuid>
<RootNamespace>SDLtest</RootNamespace>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
@ -223,4 +223,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2-UWP", "SDL-UWP.vcxproj", "{89E9B32E-A86A-47C3-A948-D2B1622925CE}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3-UWP", "SDL-UWP.vcxproj", "{89E9B32E-A86A-47C3-A948-D2B1622925CE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@ -349,8 +349,8 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{89e9b32e-a86a-47c3-a948-d2b1622925ce}</ProjectGuid>
<Keyword>DynamicLibrary</Keyword>
<ProjectName>SDL2-UWP</ProjectName>
<RootNamespace>SDL2</RootNamespace>
<ProjectName>SDL3-UWP</ProjectName>
<RootNamespace>SDL3</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
@ -439,42 +439,42 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL2</TargetName>
<TargetName>SDL3</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL2</TargetName>
<TargetName>SDL3</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL2</TargetName>
<TargetName>SDL3</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL2</TargetName>
<TargetName>SDL3</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL2</TargetName>
<TargetName>SDL3</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL2</TargetName>
<TargetName>SDL3</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL2</TargetName>
<TargetName>SDL3</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<TargetName>SDL2</TargetName>
<TargetName>SDL3</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>

View File

@ -2,9 +2,9 @@ Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D69D5741-611F-4E14-8541-1FEE94F50B5A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3", "SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2main", "SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3main", "SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checkkeys", "tests\checkkeys\checkkeys.vcxproj", "{26828762-C95D-4637-9CB1-7F0979523813}"
EndProject
@ -40,7 +40,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testshape", "tests\testshap
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "tests\testsprite2\testsprite2.vcxproj", "{40FB7794-D3C3-4CFE-BCF4-A80C96635682}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2test", "SDLtest\SDLtest.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3test", "SDLtest\SDLtest.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests\testgamecontroller\testgamecontroller.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08305}"
EndProject

View File

@ -19,7 +19,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>SDL2</ProjectName>
<ProjectName>SDL3</ProjectName>
<ProjectGuid>{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}</ProjectGuid>
<RootNamespace>SDL</RootNamespace>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

View File

@ -19,7 +19,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>SDL2main</ProjectName>
<ProjectName>SDL3main</ProjectName>
<ProjectGuid>{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}</ProjectGuid>
<RootNamespace>SDLmain</RootNamespace>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

View File

@ -19,7 +19,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>SDL2test</ProjectName>
<ProjectName>SDL3test</ProjectName>
<ProjectGuid>{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}</ProjectGuid>
<RootNamespace>SDLtest</RootNamespace>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

View File

@ -1,111 +0,0 @@
# SDL2 CMake configuration file:
# This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-VC
cmake_minimum_required(VERSION 3.0)
include(FeatureSummary)
set_package_properties(SDL2 PROPERTIES
URL "https://www.libsdl.org/"
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
)
# Copied from `configure_package_config_file`
macro(set_and_check _var _file)
set(${_var} "${_file}")
if(NOT EXISTS "${_file}")
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
endif()
endmacro()
# Copied from `configure_package_config_file`
macro(check_required_components _NAME)
foreach(comp ${${_NAME}_FIND_COMPONENTS})
if(NOT ${_NAME}_${comp}_FOUND)
if(${_NAME}_FIND_REQUIRED_${comp})
set(${_NAME}_FOUND FALSE)
endif()
endif()
endforeach()
endmacro()
set(SDL2_FOUND TRUE)
if(CMAKE_SIZEOF_VOID_P STREQUAL "4")
set(_sdl_arch_subdir "x86")
elseif(CMAKE_SIZEOF_VOID_P STREQUAL "8")
set(_sdl_arch_subdir "x64")
else()
set(SDL2_FOUND FALSE)
return()
endif()
# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
set_and_check(SDL2_PREFIX "${CMAKE_CURRENT_LIST_DIR}/..")
set_and_check(SDL2_EXEC_PREFIX "${CMAKE_CURRENT_LIST_DIR}/..")
set_and_check(SDL2_INCLUDE_DIR "${SDL2_PREFIX}/include")
set(SDL2_INCLUDE_DIRS "${SDL2_INCLUDE_DIR}")
set_and_check(SDL2_BINDIR "${SDL2_PREFIX}/lib/${_sdl_arch_subdir}")
set_and_check(SDL2_LIBDIR "${SDL2_PREFIX}/lib/${_sdl_arch_subdir}")
set(SDL2_LIBRARIES SDL2::SDL2main SDL2::SDL2)
set(SDL2MAIN_LIBRARY SDL2::SDL2main)
set(SDL2TEST_LIBRARY SDL2::SDL2test)
# All targets are created, even when some might not be requested though COMPONENTS.
# This is done for compatibility with CMake generated SDL2-target.cmake files.
set(_sdl2_library "${SDL2_LIBDIR}/SDL2.lib")
set(_sdl2_dll_library "${SDL2_BINDIR}/SDL2.dll")
if(EXISTS "${_sdl2_library}" AND EXISTS "${_sdl2_dll_library}")
if(NOT TARGET SDL2::SDL2)
add_library(SDL2::SDL2 SHARED IMPORTED)
set_target_properties(SDL2::SDL2
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
IMPORTED_IMPLIB "${_sdl2_library}"
IMPORTED_LOCATION "${_sdl2_dll_library}"
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
INTERFACE_SDL2_SHARED "ON"
)
endif()
set(SDL2_SDL2_FOUND TRUE)
else()
set(SDL2_SDL2_FOUND FALSE)
endif()
unset(_sdl2_library)
unset(_sdl2_dll_library)
set(_sdl2main_library "${SDL2_LIBDIR}/SDL2main.lib")
if(EXISTS "${_sdl2main_library}")
if(NOT TARGET SDL2::SDL2main)
add_library(SDL2::SDL2main STATIC IMPORTED)
set_target_properties(SDL2::SDL2main
PROPERTIES
IMPORTED_LOCATION "${_sdl2main_library}"
)
endif()
set(SDL2_SDL2main_FOUND TRUE)
else()
set(SDL2_SDL2_FOUND FALSE)
endif()
unset(_sdl2main_library)
set(_sdl2test_library "${SDL2_LIBDIR}/SDL2test.lib")
if(EXISTS "${_sdl2test_library}")
if(NOT TARGET SDL2::SDL2test)
add_library(SDL2::SDL2test STATIC IMPORTED)
set_target_properties(SDL2::SDL2test
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
IMPORTED_LOCATION "${_sdl2test_library}"
)
endif()
set(SDL2_SDL2test_FOUND TRUE)
else()
set(SDL2_SDL2_FOUND FALSE)
endif()
unset(_sdl2test_library)
check_required_components(SDL2)

View File

@ -1,10 +1,10 @@
# based on the files generated by CMake's write_basic_package_version_file
# SDL2 CMake version configuration file:
# This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-VC
# SDL CMake version configuration file:
# This file is meant to be placed in a cmake subfolder of SDL3-devel-3.x.y-VC
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../include/SDL_version.h")
message(AUTHOR_WARNING "Could not find SDL_version.h. This script is meant to be placed in the root of SDL2-devel-2.x.y-VC")
message(AUTHOR_WARNING "Could not find SDL_version.h. This script is meant to be placed in the root of SDL3-devel-3.x.y-VC")
return()
endif()

View File

@ -0,0 +1,111 @@
# SDL CMake configuration file:
# This file is meant to be placed in a cmake subfolder of SDL3-devel-3.x.y-VC
cmake_minimum_required(VERSION 3.0)
include(FeatureSummary)
set_package_properties(SDL3 PROPERTIES
URL "https://www.libsdl.org/"
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
)
# Copied from `configure_package_config_file`
macro(set_and_check _var _file)
set(${_var} "${_file}")
if(NOT EXISTS "${_file}")
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
endif()
endmacro()
# Copied from `configure_package_config_file`
macro(check_required_components _NAME)
foreach(comp ${${_NAME}_FIND_COMPONENTS})
if(NOT ${_NAME}_${comp}_FOUND)
if(${_NAME}_FIND_REQUIRED_${comp})
set(${_NAME}_FOUND FALSE)
endif()
endif()
endforeach()
endmacro()
set(SDL3_FOUND TRUE)
if(CMAKE_SIZEOF_VOID_P STREQUAL "4")
set(_sdl_arch_subdir "x86")
elseif(CMAKE_SIZEOF_VOID_P STREQUAL "8")
set(_sdl_arch_subdir "x64")
else()
set(SDL3_FOUND FALSE)
return()
endif()
# For compatibility with autotools sdl3-config.cmake, provide SDL3_* variables.
set_and_check(SDL3_PREFIX "${CMAKE_CURRENT_LIST_DIR}/..")
set_and_check(SDL3_EXEC_PREFIX "${CMAKE_CURRENT_LIST_DIR}/..")
set_and_check(SDL3_INCLUDE_DIR "${SDL3_PREFIX}/include")
set(SDL3_INCLUDE_DIRS "${SDL3_INCLUDE_DIR}")
set_and_check(SDL3_BINDIR "${SDL3_PREFIX}/lib/${_sdl_arch_subdir}")
set_and_check(SDL3_LIBDIR "${SDL3_PREFIX}/lib/${_sdl_arch_subdir}")
set(SDL3_LIBRARIES SDL3::SDL3main SDL3::SDL3)
set(SDL3MAIN_LIBRARY SDL3::SDL3main)
set(SDL3TEST_LIBRARY SDL3::SDL3test)
# All targets are created, even when some might not be requested though COMPONENTS.
# This is done for compatibility with CMake generated SDL3-target.cmake files.
set(_sdl3_library "${SDL3_LIBDIR}/SDL3.lib")
set(_sdl3_dll_library "${SDL3_BINDIR}/SDL3.dll")
if(EXISTS "${_sdl3_library}" AND EXISTS "${_sdl3_dll_library}")
if(NOT TARGET SDL3::SDL3)
add_library(SDL3::SDL3 SHARED IMPORTED)
set_target_properties(SDL3::SDL3
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${SDL3_INCLUDE_DIRS}"
IMPORTED_IMPLIB "${_sdl3_library}"
IMPORTED_LOCATION "${_sdl3_dll_library}"
COMPATIBLE_INTERFACE_BOOL "SDL3_SHARED"
INTERFACE_SDL3_SHARED "ON"
)
endif()
set(SDL3_SDL3_FOUND TRUE)
else()
set(SDL3_SDL3_FOUND FALSE)
endif()
unset(_sdl3_library)
unset(_sdl3_dll_library)
set(_sdl3main_library "${SDL3_LIBDIR}/SDL3main.lib")
if(EXISTS "${_sdl3main_library}")
if(NOT TARGET SDL3::SDL3main)
add_library(SDL3::SDL3main STATIC IMPORTED)
set_target_properties(SDL3::SDL3main
PROPERTIES
IMPORTED_LOCATION "${_sdl3main_library}"
)
endif()
set(SDL3_SDL3main_FOUND TRUE)
else()
set(SDL3_SDL3_FOUND FALSE)
endif()
unset(_sdl3main_library)
set(_sdl3test_library "${SDL3_LIBDIR}/SDL3test.lib")
if(EXISTS "${_sdl3test_library}")
if(NOT TARGET SDL3::SDL3test)
add_library(SDL3::SDL3test STATIC IMPORTED)
set_target_properties(SDL3::SDL3test
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${SDL3_INCLUDE_DIRS}"
IMPORTED_LOCATION "${_sdl3test_library}"
)
endif()
set(SDL3_SDL3test_FOUND TRUE)
else()
set(SDL3_SDL3_FOUND FALSE)
endif()
unset(_sdl3test_library)
check_required_components(SDL3)

View File

@ -7,14 +7,14 @@
objects = {
/* Begin PBXBuildFile section */
F3A497102555EE4800E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
F3A4972F2555EE8A00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
F3A497422555EEBE00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
F3A497442555EECD00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
F3A497462555EEDF00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A4959B2555ED0500E92A8B /* libSDL2.a */; };
F3A497492555EF0B00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
F3A4974B2555EF1B00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
F3A4974E2555EF9F00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
F3A497102555EE4800E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL3.a */; };
F3A4972F2555EE8A00E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL3.a */; };
F3A497422555EEBE00E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL3.a */; };
F3A497442555EECD00E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL3.a */; };
F3A497462555EEDF00E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A4959B2555ED0500E92A8B /* libSDL3.a */; };
F3A497492555EF0B00E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL3.a */; };
F3A4974B2555EF1B00E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL3.a */; };
F3A4974E2555EF9F00E92A8B /* libSDL3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL3.a */; };
FA30DEB01BBF5A8F009C397F /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
FA30DEB11BBF5A93009C397F /* happy.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0080E26BC0500F39101 /* happy.c */; };
FA30DEB31BBF5AD7009C397F /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDB651CC0E43D19800F688B5 /* icon.bmp */; };
@ -188,7 +188,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F3A497102555EE4800E92A8B /* libSDL2.a in Frameworks */,
F3A497102555EE4800E92A8B /* libSDL3.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -196,7 +196,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F3A497462555EEDF00E92A8B /* libSDL2.a in Frameworks */,
F3A497462555EEDF00E92A8B /* libSDL3.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -204,7 +204,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F3A497442555EECD00E92A8B /* libSDL2.a in Frameworks */,
F3A497442555EECD00E92A8B /* libSDL3.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -212,7 +212,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F3A4972F2555EE8A00E92A8B /* libSDL2.a in Frameworks */,
F3A4972F2555EE8A00E92A8B /* libSDL3.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -220,7 +220,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F3A497492555EF0B00E92A8B /* libSDL2.a in Frameworks */,
F3A497492555EF0B00E92A8B /* libSDL3.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -228,7 +228,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F3A4974E2555EF9F00E92A8B /* libSDL2.a in Frameworks */,
F3A4974E2555EF9F00E92A8B /* libSDL3.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -236,7 +236,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F3A497422555EEBE00E92A8B /* libSDL2.a in Frameworks */,
F3A497422555EEBE00E92A8B /* libSDL3.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -244,7 +244,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F3A4974B2555EF1B00E92A8B /* libSDL2.a in Frameworks */,
F3A4974B2555EF1B00E92A8B /* libSDL3.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -292,17 +292,17 @@
F3A495812555ED0400E92A8B /* Products */ = {
isa = PBXGroup;
children = (
F3A495912555ED0500E92A8B /* SDL2.framework */,
F3A495932555ED0500E92A8B /* SDL2.framework */,
F3A495952555ED0500E92A8B /* SDL2.framework */,
F3C17D9228E4355900E1A26D /* SDL2.framework */,
F3A495972555ED0500E92A8B /* libSDL2.a */,
F3A495992555ED0500E92A8B /* libSDL2.a */,
F3A4959B2555ED0500E92A8B /* libSDL2.a */,
F3A4959D2555ED0500E92A8B /* libSDL2.dylib */,
F3A4959F2555ED0500E92A8B /* libSDL2.dylib */,
F3A495A12555ED0500E92A8B /* libSDL2.dylib */,
F3A495A32555ED0500E92A8B /* SDL2 */,
F3A495912555ED0500E92A8B /* SDL3.framework */,
F3A495932555ED0500E92A8B /* SDL3.framework */,
F3A495952555ED0500E92A8B /* SDL3.framework */,
F3C17D9228E4355900E1A26D /* SDL3.framework */,
F3A495972555ED0500E92A8B /* libSDL3.a */,
F3A495992555ED0500E92A8B /* libSDL3.a */,
F3A4959B2555ED0500E92A8B /* libSDL3.a */,
F3A4959D2555ED0500E92A8B /* libSDL3.dylib */,
F3A4959F2555ED0500E92A8B /* libSDL3.dylib */,
F3A495A12555ED0500E92A8B /* libSDL3.dylib */,
F3A495A32555ED0500E92A8B /* SDL3 */,
);
name = Products;
sourceTree = "<group>";
@ -565,80 +565,80 @@
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
F3A495912555ED0500E92A8B /* SDL2.framework */ = {
F3A495912555ED0500E92A8B /* SDL3.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = SDL2.framework;
path = SDL3.framework;
remoteRef = F3A495902555ED0500E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A495932555ED0500E92A8B /* SDL2.framework */ = {
F3A495932555ED0500E92A8B /* SDL3.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = SDL2.framework;
path = SDL3.framework;
remoteRef = F3A495922555ED0500E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A495952555ED0500E92A8B /* SDL2.framework */ = {
F3A495952555ED0500E92A8B /* SDL3.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = SDL2.framework;
path = SDL3.framework;
remoteRef = F3A495942555ED0500E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A495972555ED0500E92A8B /* libSDL2.a */ = {
F3A495972555ED0500E92A8B /* libSDL3.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSDL2.a;
path = libSDL3.a;
remoteRef = F3A495962555ED0500E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A495992555ED0500E92A8B /* libSDL2.a */ = {
F3A495992555ED0500E92A8B /* libSDL3.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSDL2.a;
path = libSDL3.a;
remoteRef = F3A495982555ED0500E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A4959B2555ED0500E92A8B /* libSDL2.a */ = {
F3A4959B2555ED0500E92A8B /* libSDL3.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSDL2.a;
path = libSDL3.a;
remoteRef = F3A4959A2555ED0500E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A4959D2555ED0500E92A8B /* libSDL2.dylib */ = {
F3A4959D2555ED0500E92A8B /* libSDL3.dylib */ = {
isa = PBXReferenceProxy;
fileType = "compiled.mach-o.dylib";
path = libSDL2.dylib;
path = libSDL3.dylib;
remoteRef = F3A4959C2555ED0500E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A4959F2555ED0500E92A8B /* libSDL2.dylib */ = {
F3A4959F2555ED0500E92A8B /* libSDL3.dylib */ = {
isa = PBXReferenceProxy;
fileType = "compiled.mach-o.dylib";
path = libSDL2.dylib;
path = libSDL3.dylib;
remoteRef = F3A4959E2555ED0500E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A495A12555ED0500E92A8B /* libSDL2.dylib */ = {
F3A495A12555ED0500E92A8B /* libSDL3.dylib */ = {
isa = PBXReferenceProxy;
fileType = "compiled.mach-o.dylib";
path = libSDL2.dylib;
path = libSDL3.dylib;
remoteRef = F3A495A02555ED0500E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3A495A32555ED0500E92A8B /* SDL2 */ = {
F3A495A32555ED0500E92A8B /* SDL3 */ = {
isa = PBXReferenceProxy;
fileType = "compiled.mach-o.executable";
path = SDL2;
path = SDL3;
remoteRef = F3A495A22555ED0500E92A8B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3C17D9228E4355900E1A26D /* SDL2.framework */ = {
F3C17D9228E4355900E1A26D /* SDL3.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = SDL2.framework;
path = SDL3.framework;
remoteRef = F3C17D9128E4355900E1A26D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};

View File

@ -2,7 +2,7 @@
About the iPhone OS Demo Applications
==============================================================================
Demos.xcodeproj contains several targets for iPhone oriented SDL demos. These demos are written strictly using SDL 2.0 calls. All the demos except for Fireworks (which requires OpenGL ES) should work on platforms other than iPhone OS, though you'll need to write your own compile script.
Demos.xcodeproj contains several targets for iPhone oriented SDL demos. These demos are written strictly using SDL 3.0 calls. All the demos except for Fireworks (which requires OpenGL ES) should work on platforms other than iPhone OS, though you'll need to write your own compile script.
Common files:

View File

@ -9,6 +9,6 @@
// Include any optional config for this build
#include? "build.xcconfig"
CONFIG_FRAMEWORK_LDFLAGS[sdk=macos*] = $(inherited) -framework SDL2 -framework AudioToolbox -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreHaptics -framework CoreVideo -framework ForceFeedback -framework GameController -framework IOKit -framework Metal
CONFIG_FRAMEWORK_LDFLAGS[sdk=macos*] = $(inherited) -framework SDL3 -framework AudioToolbox -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreHaptics -framework CoreVideo -framework ForceFeedback -framework GameController -framework IOKit -framework Metal
CONFIG_FRAMEWORK_LDFLAGS[sdk=iphone*] = $(inherited) -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit
CONFIG_FRAMEWORK_LDFLAGS[sdk=appletv*] = $(inherited) -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit

View File

@ -19,10 +19,10 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.26.0</string>
<string>3.0.0</string>
<key>CFBundleSignature</key>
<string>SDLX</string>
<key>CFBundleVersion</key>
<string>2.26.0</string>
<string>3.0.0</string>
</dict>
</plist>

View File

@ -3704,8 +3704,8 @@
A1BB8B6227F6CF330057CFA8 /* SDL_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_list.h; sourceTree = "<group>"; };
A7381E931D8B69C300B177DD /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
A7381E951D8B69D600B177DD /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
A75FCEB323E25AB700529352 /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
A75FD06C23E25AC700529352 /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
A75FCEB323E25AB700529352 /* libSDL3.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL3.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
A75FD06C23E25AC700529352 /* libSDL3.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL3.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
A75FDAA523E2792500529352 /* hid.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = hid.m; sourceTree = "<group>"; };
A75FDAAC23E2795C00529352 /* SDL_hidapi_steam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_steam.c; sourceTree = "<group>"; };
A75FDAB923E28A7A00529352 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
@ -3723,11 +3723,11 @@
A75FDBA723E4CB6F00529352 /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = "<group>"; };
A75FDBC323EA380300529352 /* SDL_hidapi_rumble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hidapi_rumble.h; sourceTree = "<group>"; };
A75FDBC423EA380300529352 /* SDL_hidapi_rumble.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_rumble.c; sourceTree = "<group>"; };
A769B23D23E259AE00872273 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; };
A769B23D23E259AE00872273 /* libSDL3.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL3.a; sourceTree = BUILT_PRODUCTS_DIR; };
A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamecontroller.h; sourceTree = "<group>"; };
A7D88B5423E2437C00DCD162 /* SDL2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A7D88D1523E24BED00DCD162 /* SDL2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A7D88E5423E24D3B00DCD162 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; };
A7D88B5423E2437C00DCD162 /* SDL3.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL3.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A7D88D1523E24BED00DCD162 /* SDL3.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL3.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A7D88E5423E24D3B00DCD162 /* libSDL3.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL3.a; sourceTree = BUILT_PRODUCTS_DIR; };
A7D8A57023E2513D00DCD162 /* SDL_dataqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dataqueue.h; sourceTree = "<group>"; };
A7D8A57123E2513D00DCD162 /* SDL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL.c; sourceTree = "<group>"; };
A7D8A57323E2513D00DCD162 /* SDL_spinlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_spinlock.c; sourceTree = "<group>"; };
@ -4098,11 +4098,11 @@
AAC070F8195606770073DCDF /* SDL_opengles2_khrplatform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_opengles2_khrplatform.h; sourceTree = "<group>"; };
AADA5B8616CCAB3000107CF7 /* SDL_bits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_bits.h; sourceTree = "<group>"; };
BECDF66B0761BA81005FE872 /* Info-Framework.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-Framework.plist"; sourceTree = "<group>"; };
BECDF66C0761BA81005FE872 /* SDL2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
BECDF6B30761BA81005FE872 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; };
BECDF6BE0761BA81005FE872 /* SDL2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = SDL2; sourceTree = BUILT_PRODUCTS_DIR; };
DB31407717554B71006C0E22 /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
E2D187CF28A5673500D2B4F1 /* SDL2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
BECDF66C0761BA81005FE872 /* SDL3.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL3.framework; sourceTree = BUILT_PRODUCTS_DIR; };
BECDF6B30761BA81005FE872 /* libSDL3.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL3.a; sourceTree = BUILT_PRODUCTS_DIR; };
BECDF6BE0761BA81005FE872 /* SDL3 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = SDL3; sourceTree = BUILT_PRODUCTS_DIR; };
DB31407717554B71006C0E22 /* libSDL3.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL3.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
E2D187CF28A5673500D2B4F1 /* SDL3.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL3.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E2D187D228A5673500D2B4F1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F31A92C628D4CB39003BFD6A /* SDL_offscreenopengles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_offscreenopengles.h; sourceTree = "<group>"; };
F31A92C728D4CB39003BFD6A /* SDL_offscreenopengles.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_offscreenopengles.c; sourceTree = "<group>"; };
@ -4386,17 +4386,17 @@
034768DDFF38A45A11DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
BECDF66C0761BA81005FE872 /* SDL2.framework */,
BECDF6B30761BA81005FE872 /* libSDL2.a */,
BECDF6BE0761BA81005FE872 /* SDL2 */,
DB31407717554B71006C0E22 /* libSDL2.dylib */,
A7D88B5423E2437C00DCD162 /* SDL2.framework */,
A7D88D1523E24BED00DCD162 /* SDL2.framework */,
A7D88E5423E24D3B00DCD162 /* libSDL2.a */,
A769B23D23E259AE00872273 /* libSDL2.a */,
A75FCEB323E25AB700529352 /* libSDL2.dylib */,
A75FD06C23E25AC700529352 /* libSDL2.dylib */,
E2D187CF28A5673500D2B4F1 /* SDL2.framework */,
BECDF66C0761BA81005FE872 /* SDL3.framework */,
BECDF6B30761BA81005FE872 /* libSDL3.a */,
BECDF6BE0761BA81005FE872 /* SDL3 */,
DB31407717554B71006C0E22 /* libSDL3.dylib */,
A7D88B5423E2437C00DCD162 /* SDL3.framework */,
A7D88D1523E24BED00DCD162 /* SDL3.framework */,
A7D88E5423E24D3B00DCD162 /* libSDL3.a */,
A769B23D23E259AE00872273 /* libSDL3.a */,
A75FCEB323E25AB700529352 /* libSDL3.dylib */,
A75FD06C23E25AC700529352 /* libSDL3.dylib */,
E2D187CF28A5673500D2B4F1 /* SDL3.framework */,
);
name = Products;
sourceTree = "<group>";
@ -4408,7 +4408,7 @@
F59C70FC00D5CB5801000001 /* pkg-support */,
0153844A006D81B07F000001 /* Public Headers */,
08FB77ACFE841707C02AAC07 /* Library Source */,
E2D187D028A5673500D2B4F1 /* SDL2 */,
E2D187D028A5673500D2B4F1 /* SDL3 */,
034768DDFF38A45A11DB9C8B /* Products */,
BECDF66B0761BA81005FE872 /* Info-Framework.plist */,
564624341FF821B70074AC87 /* Frameworks */,
@ -5344,12 +5344,12 @@
path = events;
sourceTree = "<group>";
};
E2D187D028A5673500D2B4F1 /* SDL2 */ = {
E2D187D028A5673500D2B4F1 /* SDL3 */ = {
isa = PBXGroup;
children = (
E2D187D228A5673500D2B4F1 /* Info.plist */,
);
path = SDL2;
path = SDL3;
sourceTree = "<group>";
};
F3ADAB8C2576F08500A6B1D9 /* ios */ = {
@ -7299,13 +7299,13 @@
);
buildRules = (
);
comments = "This produces libSDL2.dylib, which is the shared build of SDL.";
comments = "This produces libSDL3.dylib, which is the shared build of SDL.";
dependencies = (
);
name = "Shared Library-iOS";
productInstallPath = /usr/local/lib;
productName = "Shared Library";
productReference = A75FCEB323E25AB700529352 /* libSDL2.dylib */;
productReference = A75FCEB323E25AB700529352 /* libSDL3.dylib */;
productType = "com.apple.product-type.library.dynamic";
};
A75FCEB423E25AC700529352 /* Shared Library-tvOS */ = {
@ -7319,13 +7319,13 @@
);
buildRules = (
);
comments = "This produces libSDL2.dylib, which is the shared build of SDL.";
comments = "This produces libSDL3.dylib, which is the shared build of SDL.";
dependencies = (
);
name = "Shared Library-tvOS";
productInstallPath = /usr/local/lib;
productName = "Shared Library";
productReference = A75FD06C23E25AC700529352 /* libSDL2.dylib */;
productReference = A75FD06C23E25AC700529352 /* libSDL3.dylib */;
productType = "com.apple.product-type.library.dynamic";
};
A769B08223E259AE00872273 /* Static Library-tvOS */ = {
@ -7345,7 +7345,7 @@
name = "Static Library-tvOS";
productInstallPath = /usr/local/lib;
productName = "Static Library";
productReference = A769B23D23E259AE00872273 /* libSDL2.a */;
productReference = A769B23D23E259AE00872273 /* libSDL3.a */;
productType = "com.apple.product-type.library.static";
};
A7D88A1423E2437C00DCD162 /* Framework-iOS */ = {
@ -7367,7 +7367,7 @@
name = "Framework-iOS";
productInstallPath = "@executable_path/../Frameworks";
productName = SDL;
productReference = A7D88B5423E2437C00DCD162 /* SDL2.framework */;
productReference = A7D88B5423E2437C00DCD162 /* SDL3.framework */;
productType = "com.apple.product-type.framework";
};
A7D88BC923E24BED00DCD162 /* Framework-tvOS */ = {
@ -7389,7 +7389,7 @@
name = "Framework-tvOS";
productInstallPath = "@executable_path/../Frameworks";
productName = SDL;
productReference = A7D88D1523E24BED00DCD162 /* SDL2.framework */;
productReference = A7D88D1523E24BED00DCD162 /* SDL3.framework */;
productType = "com.apple.product-type.framework";
};
A7D88D1723E24D3B00DCD162 /* Static Library-iOS */ = {
@ -7409,7 +7409,7 @@
name = "Static Library-iOS";
productInstallPath = /usr/local/lib;
productName = "Static Library";
productReference = A7D88E5423E24D3B00DCD162 /* libSDL2.a */;
productReference = A7D88E5423E24D3B00DCD162 /* libSDL3.a */;
productType = "com.apple.product-type.library.static";
};
BECDF5FE0761BA81005FE872 /* Framework */ = {
@ -7431,7 +7431,7 @@
name = Framework;
productInstallPath = "@executable_path/../Frameworks";
productName = SDL;
productReference = BECDF66C0761BA81005FE872 /* SDL2.framework */;
productReference = BECDF66C0761BA81005FE872 /* SDL3.framework */;
productType = "com.apple.product-type.framework";
};
BECDF66D0761BA81005FE872 /* Static Library */ = {
@ -7451,7 +7451,7 @@
name = "Static Library";
productInstallPath = /usr/local/lib;
productName = "Static Library";
productReference = BECDF6B30761BA81005FE872 /* libSDL2.a */;
productReference = BECDF6B30761BA81005FE872 /* libSDL3.a */;
productType = "com.apple.product-type.library.static";
};
BECDF6BB0761BA81005FE872 /* Standard DMG */ = {
@ -7468,7 +7468,7 @@
name = "Standard DMG";
productInstallPath = /usr/local/bin;
productName = "Standard Package";
productReference = BECDF6BE0761BA81005FE872 /* SDL2 */;
productReference = BECDF6BE0761BA81005FE872 /* SDL3 */;
productType = "com.apple.product-type.tool";
};
DB313F7217554B71006C0E22 /* Shared Library */ = {
@ -7482,13 +7482,13 @@
);
buildRules = (
);
comments = "This produces libSDL2.dylib, which is the shared build of SDL.";
comments = "This produces libSDL3.dylib, which is the shared build of SDL.";
dependencies = (
);
name = "Shared Library";
productInstallPath = /usr/local/lib;
productName = "Shared Library";
productReference = DB31407717554B71006C0E22 /* libSDL2.dylib */;
productReference = DB31407717554B71006C0E22 /* libSDL3.dylib */;
productType = "com.apple.product-type.library.dynamic";
};
E2D187CE28A5673500D2B4F1 /* xcFramework-iOS */ = {
@ -7506,8 +7506,8 @@
dependencies = (
);
name = "xcFramework-iOS";
productName = SDL2;
productReference = E2D187CF28A5673500D2B4F1 /* SDL2.framework */;
productName = SDL3;
productReference = E2D187CF28A5673500D2B4F1 /* SDL3.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
@ -7645,7 +7645,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Sign framework\nif [ \"$SDL_CODESIGN_IDENTITY\" != \"\" ]; then\n codesign --force --deep --sign \"$SDL_CODESIGN_IDENTITY\" $TARGET_BUILD_DIR/SDL2.framework/Versions/A || exit $?\nfi\n\n# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\ncp -a $TARGET_BUILD_DIR/SDL2.framework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\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 SDL2 -srcfolder build/dmg-tmp build/SDL2.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
shellScript = "# Sign framework\nif [ \"$SDL_CODESIGN_IDENTITY\" != \"\" ]; then\n codesign --force --deep --sign \"$SDL_CODESIGN_IDENTITY\" $TARGET_BUILD_DIR/SDL3.framework/Versions/A || exit $?\nfi\n\n# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\ncp -a $TARGET_BUILD_DIR/SDL3.framework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\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";
};
E2D187E728A5685000D2B4F1 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@ -7662,7 +7662,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Build an xcframework with both device and simulator files for all platforms.\n# Adapted from an answer in\n# https://developer.apple.com/forums/thread/666335?answerId=685927022#685927022\n\nif [ \"$XCODE_VERSION_ACTUAL\" -lt 1100 ]\nthen\n\techo \"error: Building an xcframework requires Xcode 11 minimum.\"\n\texit 1\nfi\n\nSCHEME_NAME=\"Framework-iOS\"\nFRAMEWORK_NAME=\"SDL2\"\nPROJECT_NAME=\"SDL\"\n\nSIMULATOR_ARCHIVE_PATH=\"${BUILD_DIR}/${CONFIGURATION}/${FRAMEWORK_NAME}-iphonesimulator.xcarchive\"\nDEVICE_ARCHIVE_PATH=\"${BUILD_DIR}/${CONFIGURATION}/${FRAMEWORK_NAME}-iphoneos.xcarchive\"\n\nOUTPUT_DIR=\"./Products/\"\n\n# Simulator xcarchive (arm64, i386, x86_64)\nxcodebuild archive \\\n\tONLY_ACTIVE_ARCH=NO \\\n\t-scheme ${SCHEME_NAME} \\\n\t-project \"${PROJECT_NAME}.xcodeproj\" \\\n\t-archivePath ${SIMULATOR_ARCHIVE_PATH} \\\n\t-sdk iphonesimulator \\\n\tBUILD_LIBRARY_FOR_DISTRIBUTION=YES \\\n\tSKIP_INSTALL=NO\n\n# Device xcarchive (arm64, armv7)\nxcodebuild archive \\\n\t-scheme ${SCHEME_NAME} \\\n\t-project \"${PROJECT_NAME}.xcodeproj\" \\\n\t-archivePath ${DEVICE_ARCHIVE_PATH} \\\n\t-sdk iphoneos \\\n\tBUILD_LIBRARY_FOR_DISTRIBUTION=YES \\\n\tSKIP_INSTALL=NO\n\n# Clean-up any existing instance of this xcframework from the Products directory\nrm -rf \"${OUTPUT_DIR}${FRAMEWORK_NAME}.xcframework\"\n\n# Create final xcframework\nxcodebuild -create-xcframework \\\n\t-framework \"${DEVICE_ARCHIVE_PATH}\"/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework \\\n\t-framework \"${SIMULATOR_ARCHIVE_PATH}\"/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework \\\n\t-output ${OUTPUT_DIR}/${FRAMEWORK_NAME}.xcframework\n\n# Ensure git doesn't pick up on our Products folder. \nrm -rf ${OUTPUT_DIR}/.gitignore\necho \"*\" >> ${OUTPUT_DIR}/.gitignore\n";
shellScript = "# Build an xcframework with both device and simulator files for all platforms.\n# Adapted from an answer in\n# https://developer.apple.com/forums/thread/666335?answerId=685927022#685927022\n\nif [ \"$XCODE_VERSION_ACTUAL\" -lt 1100 ]\nthen\n\techo \"error: Building an xcframework requires Xcode 11 minimum.\"\n\texit 1\nfi\n\nSCHEME_NAME=\"Framework-iOS\"\nFRAMEWORK_NAME=\"SDL3\"\nPROJECT_NAME=\"SDL\"\n\nSIMULATOR_ARCHIVE_PATH=\"${BUILD_DIR}/${CONFIGURATION}/${FRAMEWORK_NAME}-iphonesimulator.xcarchive\"\nDEVICE_ARCHIVE_PATH=\"${BUILD_DIR}/${CONFIGURATION}/${FRAMEWORK_NAME}-iphoneos.xcarchive\"\n\nOUTPUT_DIR=\"./Products/\"\n\n# Simulator xcarchive (arm64, i386, x86_64)\nxcodebuild archive \\\n\tONLY_ACTIVE_ARCH=NO \\\n\t-scheme ${SCHEME_NAME} \\\n\t-project \"${PROJECT_NAME}.xcodeproj\" \\\n\t-archivePath ${SIMULATOR_ARCHIVE_PATH} \\\n\t-sdk iphonesimulator \\\n\tBUILD_LIBRARY_FOR_DISTRIBUTION=YES \\\n\tSKIP_INSTALL=NO\n\n# Device xcarchive (arm64, armv7)\nxcodebuild archive \\\n\t-scheme ${SCHEME_NAME} \\\n\t-project \"${PROJECT_NAME}.xcodeproj\" \\\n\t-archivePath ${DEVICE_ARCHIVE_PATH} \\\n\t-sdk iphoneos \\\n\tBUILD_LIBRARY_FOR_DISTRIBUTION=YES \\\n\tSKIP_INSTALL=NO\n\n# Clean-up any existing instance of this xcframework from the Products directory\nrm -rf \"${OUTPUT_DIR}${FRAMEWORK_NAME}.xcframework\"\n\n# Create final xcframework\nxcodebuild -create-xcframework \\\n\t-framework \"${DEVICE_ARCHIVE_PATH}\"/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework \\\n\t-framework \"${SIMULATOR_ARCHIVE_PATH}\"/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework \\\n\t-output ${OUTPUT_DIR}/${FRAMEWORK_NAME}.xcframework\n\n# Ensure git doesn't pick up on our Products folder. \nrm -rf ${OUTPUT_DIR}/.gitignore\necho \"*\" >> ${OUTPUT_DIR}/.gitignore\n";
};
F3ED8106281DB8A500C33C5B /* Convert SDL includes to SDL Framework includes */ = {
isa = PBXShellScriptBuildPhase;
@ -7680,7 +7680,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cd \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -i '' -e 's,#include \"\\(.*\\)\",#include <SDL2/\\1>,' *.h\n";
shellScript = "cd \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -i '' -e 's,#include \"\\(.*\\)\",#include <SDL3/\\1>,' *.h\n";
};
F3ED8107281DB8E600C33C5B /* Convert SDL includes to SDL Framework includes */ = {
isa = PBXShellScriptBuildPhase;
@ -7698,7 +7698,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cd \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -i '' -e 's,#include \"\\(.*\\)\",#include <SDL2/\\1>,' *.h\n";
shellScript = "cd \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -i '' -e 's,#include \"\\(.*\\)\",#include <SDL3/\\1>,' *.h\n";
};
F3ED8108281DB8F200C33C5B /* Convert SDL includes to SDL Framework includes */ = {
isa = PBXShellScriptBuildPhase;
@ -7716,7 +7716,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cd \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -i '' -e 's,#include \"\\(.*\\)\",#include <SDL2/\\1>,' *.h\n";
shellScript = "cd \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"\nsed -i '' -e 's,#include \"\\(.*\\)\",#include <SDL3/\\1>,' *.h\n";
};
/* End PBXShellScriptBuildPhase section */
@ -9528,8 +9528,8 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEPLOYMENT_POSTPROCESSING = YES;
DYLIB_COMPATIBILITY_VERSION = 2601.0.0;
DYLIB_CURRENT_VERSION = 2601.0.0;
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
DYLIB_CURRENT_VERSION = 1.0.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_ALTIVEC_EXTENSIONS = YES;
@ -9559,8 +9559,8 @@
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.9;
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL2;
PRODUCT_NAME = SDL2;
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
PRODUCT_NAME = SDL3;
STRIP_STYLE = "non-global";
TVOS_DEPLOYMENT_TARGET = 9.0;
};
@ -9570,7 +9570,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_LINK_OBJC_RUNTIME = NO;
MARKETING_VERSION = 2.0.17;
MARKETING_VERSION = 3.0.0;
OTHER_LDFLAGS = "-liconv";
};
name = Release;
@ -9613,8 +9613,8 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 2601.0.0;
DYLIB_CURRENT_VERSION = 2601.0.0;
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
DYLIB_CURRENT_VERSION = 1.0.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@ -9645,8 +9645,8 @@
);
MACOSX_DEPLOYMENT_TARGET = 10.9;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL2;
PRODUCT_NAME = SDL2;
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
PRODUCT_NAME = SDL3;
STRIP_INSTALLED_PRODUCT = NO;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
@ -9656,7 +9656,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_LINK_OBJC_RUNTIME = NO;
MARKETING_VERSION = 2.0.17;
MARKETING_VERSION = 3.0.0;
OTHER_LDFLAGS = "-liconv";
};
name = Debug;
@ -9862,8 +9862,8 @@
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 2601.0.0;
DYLIB_CURRENT_VERSION = 2601.0.0;
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
DYLIB_CURRENT_VERSION = 1.0.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
@ -9873,7 +9873,7 @@
);
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = SDL2/Info.plist;
INFOPLIST_FILE = SDL3/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
LD_RUNPATH_SEARCH_PATHS = (
@ -9885,7 +9885,7 @@
MTL_FAST_MATH = YES;
OTHER_LDFLAGS = "-liconv";
PRODUCT_BUNDLE_IDENTIFIER = "";
PRODUCT_NAME = SDL2;
PRODUCT_NAME = SDL3;
SDKROOT = iphoneos;
SKIP_INSTALL = NO;
SUPPORTS_MACCATALYST = NO;
@ -9914,14 +9914,14 @@
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 2601.0.0;
DYLIB_CURRENT_VERSION = 2601.0.0;
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
DYLIB_CURRENT_VERSION = 1.0.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = SDL2/Info.plist;
INFOPLIST_FILE = SDL3/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
LD_RUNPATH_SEARCH_PATHS = (
@ -9933,7 +9933,7 @@
MTL_FAST_MATH = YES;
OTHER_LDFLAGS = "-liconv";
PRODUCT_BUNDLE_IDENTIFIER = "";
PRODUCT_NAME = SDL2;
PRODUCT_NAME = SDL3;
SDKROOT = iphoneos;
SKIP_INSTALL = NO;
SUPPORTS_MACCATALYST = NO;

View File

@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A7D88A1423E2437C00DCD162"
BuildableName = "SDL2.framework"
BuildableName = "SDL3.framework"
BlueprintName = "Framework-iOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
@ -51,7 +51,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A7D88A1423E2437C00DCD162"
BuildableName = "SDL2.framework"
BuildableName = "SDL3.framework"
BlueprintName = "Framework-iOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>

View File

@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E2D187CE28A5673500D2B4F1"
BuildableName = "SDL2.framework"
BuildableName = "SDL3.framework"
BlueprintName = "xcFramework-iOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
@ -51,7 +51,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E2D187CE28A5673500D2B4F1"
BuildableName = "SDL2.framework"
BuildableName = "SDL3.framework"
BlueprintName = "xcFramework-iOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>

View File

@ -1,4 +1,4 @@
Title SDL 2.0.0
Title SDL 3.0.0
Version 1
Description SDL Library for Mac OS X (http://www.libsdl.org)
DefaultLocation /Library/Frameworks

View File

@ -1,69 +0,0 @@
# SDL2 CMake configuration file:
# This file is meant to be placed in Resources/CMake of a SDL2 framework
# INTERFACE_LINK_OPTIONS needs CMake 3.12
cmake_minimum_required(VERSION 3.12)
include(FeatureSummary)
set_package_properties(SDL2 PROPERTIES
URL "https://www.libsdl.org/"
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
)
# Copied from `configure_package_config_file`
macro(set_and_check _var _file)
set(${_var} "${_file}")
if(NOT EXISTS "${_file}")
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
endif()
endmacro()
# Copied from `configure_package_config_file`
macro(check_required_components _NAME)
foreach(comp ${${_NAME}_FIND_COMPONENTS})
if(NOT ${_NAME}_${comp}_FOUND)
if(${_NAME}_FIND_REQUIRED_${comp})
set(${_NAME}_FOUND FALSE)
endif()
endif()
endforeach()
endmacro()
set(SDL2_FOUND TRUE)
string(REGEX REPLACE "SDL2\\.framework.*" "SDL2.framework" SDL2_FRAMEWORK_PATH "${CMAKE_CURRENT_LIST_DIR}")
string(REGEX REPLACE "SDL2\\.framework.*" "" SDL2_FRAMEWORK_PARENT_PATH "${CMAKE_CURRENT_LIST_DIR}")
# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
set_and_check(SDL2_PREFIX "${SDL2_FRAMEWORK_PATH}")
set_and_check(SDL2_EXEC_PREFIX "${SDL2_FRAMEWORK_PATH}")
set_and_check(SDL2_INCLUDE_DIR "${SDL2_FRAMEWORK_PATH}/Headers")
set(SDL2_INCLUDE_DIRS "${SDL2_INCLUDE_DIR};${SDL2_FRAMEWORK_PATH}")
set_and_check(SDL2_BINDIR "${SDL2_FRAMEWORK_PATH}")
set_and_check(SDL2_LIBDIR "${SDL2_FRAMEWORK_PATH}")
set(SDL2_LIBRARIES "SDL2::SDL2")
# All targets are created, even when some might not be requested though COMPONENTS.
# This is done for compatibility with CMake generated SDL2-target.cmake files.
if(NOT TARGET SDL2::SDL2)
add_library(SDL2::SDL2 INTERFACE IMPORTED)
set_target_properties(SDL2::SDL2
PROPERTIES
INTERFACE_COMPILE_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\""
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
INTERFACE_LINK_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\";SHELL:-framework SDL2"
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
INTERFACE_SDL2_SHARED "ON"
)
endif()
set(SDL2_SDL2_FOUND TRUE)
if(NOT TARGET SDL2::SDL2main)
add_library(SDL2::SDL2main INTERFACE IMPORTED)
endif()
set(SDL2_SDL2main_FOUND TRUE)
check_required_components(SDL2)

View File

@ -1,10 +1,10 @@
# based on the files generated by CMake's write_basic_package_version_file
# SDL2 CMake version configuration file:
# This file is meant to be placed in Resources/CMake of a SDL2 framework
# SDL CMake version configuration file:
# This file is meant to be placed in Resources/CMake of a SDL3 framework
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../Headers/SDL_version.h")
message(AUTHOR_WARNING "Could not find SDL_version.h. This script is meant to be placed in the Resources/CMake directory of SDL2.framework")
message(AUTHOR_WARNING "Could not find SDL_version.h. This script is meant to be placed in the Resources/CMake directory of SDL3.framework")
return()
endif()

View File

@ -0,0 +1,69 @@
# SDL CMake configuration file:
# This file is meant to be placed in Resources/CMake of a SDL3 framework
# INTERFACE_LINK_OPTIONS needs CMake 3.12
cmake_minimum_required(VERSION 3.12)
include(FeatureSummary)
set_package_properties(SDL3 PROPERTIES
URL "https://www.libsdl.org/"
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
)
# Copied from `configure_package_config_file`
macro(set_and_check _var _file)
set(${_var} "${_file}")
if(NOT EXISTS "${_file}")
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
endif()
endmacro()
# Copied from `configure_package_config_file`
macro(check_required_components _NAME)
foreach(comp ${${_NAME}_FIND_COMPONENTS})
if(NOT ${_NAME}_${comp}_FOUND)
if(${_NAME}_FIND_REQUIRED_${comp})
set(${_NAME}_FOUND FALSE)
endif()
endif()
endforeach()
endmacro()
set(SDL3_FOUND TRUE)
string(REGEX REPLACE "SDL3\\.framework.*" "SDL3.framework" SDL3_FRAMEWORK_PATH "${CMAKE_CURRENT_LIST_DIR}")
string(REGEX REPLACE "SDL3\\.framework.*" "" SDL3_FRAMEWORK_PARENT_PATH "${CMAKE_CURRENT_LIST_DIR}")
# For compatibility with autotools sdl3-config.cmake, provide SDL3_* variables.
set_and_check(SDL3_PREFIX "${SDL3_FRAMEWORK_PATH}")
set_and_check(SDL3_EXEC_PREFIX "${SDL3_FRAMEWORK_PATH}")
set_and_check(SDL3_INCLUDE_DIR "${SDL3_FRAMEWORK_PATH}/Headers")
set(SDL3_INCLUDE_DIRS "${SDL3_INCLUDE_DIR};${SDL3_FRAMEWORK_PATH}")
set_and_check(SDL3_BINDIR "${SDL3_FRAMEWORK_PATH}")
set_and_check(SDL3_LIBDIR "${SDL3_FRAMEWORK_PATH}")
set(SDL3_LIBRARIES "SDL3::SDL3")
# All targets are created, even when some might not be requested though COMPONENTS.
# This is done for compatibility with CMake generated SDL3-target.cmake files.
if(NOT TARGET SDL3::SDL3)
add_library(SDL3::SDL3 INTERFACE IMPORTED)
set_target_properties(SDL3::SDL3
PROPERTIES
INTERFACE_COMPILE_OPTIONS "SHELL:-F \"${SDL3_FRAMEWORK_PARENT_PATH}\""
INTERFACE_INCLUDE_DIRECTORIES "${SDL3_INCLUDE_DIRS}"
INTERFACE_LINK_OPTIONS "SHELL:-F \"${SDL3_FRAMEWORK_PARENT_PATH}\";SHELL:-framework SDL3"
COMPATIBLE_INTERFACE_BOOL "SDL3_SHARED"
INTERFACE_SDL3_SHARED "ON"
)
endif()
set(SDL3_SDL3_FOUND TRUE)
if(NOT TARGET SDL3::SDL3main)
add_library(SDL3::SDL3main INTERFACE IMPORTED)
endif()
set(SDL3_SDL3main_FOUND TRUE)
check_required_components(SDL3)

View File

@ -15,20 +15,20 @@ contains both the SDL runtime component and development header files.
To Install:
Copy the SDL2.framework to /Library/Frameworks
Copy the SDL3.framework to /Library/Frameworks
You may alternatively install it in <Your home directory>/Library/Frameworks
if your access privileges are not high enough.
Use in CMake projects:
SDL2.framework can be used in CMake projects using the following pattern:
SDL3.framework can be used in CMake projects using the following pattern:
```
find_package(SDL2 REQUIRED COMPONENTS SDL2)
find_package(SDL3 REQUIRED COMPONENTS SDL3)
add_executable(my_game ${MY_SOURCES})
target_link_libraries(my_game PRIVATE SDL2::SDL2)
target_link_libraries(my_game PRIVATE SDL3::SDL3)
```
If SDL2.framework is installed in a non-standard location,
If SDL3.framework is installed in a non-standard location,
please refer to the following link for ways to configure CMake:
https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure

View File

@ -1222,17 +1222,17 @@
003FA63B093FFD41000C53B3 /* Products */ = {
isa = PBXGroup;
children = (
003FA643093FFD41000C53B3 /* SDL2.framework */,
F3C17C5D28E3FB2900E1A26D /* SDL2.framework */,
F3C17C5F28E3FB2900E1A26D /* SDL2.framework */,
F3C17C6128E3FB2900E1A26D /* SDL2.framework */,
003FA645093FFD41000C53B3 /* libSDL2.a */,
F3C17C6328E3FB2900E1A26D /* libSDL2.a */,
F3C17C6528E3FB2900E1A26D /* libSDL2.a */,
DB1D40D717B3F30D00D74CFC /* libSDL2.dylib */,
F3C17C6728E3FB2900E1A26D /* libSDL2.dylib */,
F3C17C6928E3FB2900E1A26D /* libSDL2.dylib */,
003FA649093FFD41000C53B3 /* SDL2 */,
003FA643093FFD41000C53B3 /* SDL3.framework */,
F3C17C5D28E3FB2900E1A26D /* SDL3.framework */,
F3C17C5F28E3FB2900E1A26D /* SDL3.framework */,
F3C17C6128E3FB2900E1A26D /* SDL3.framework */,
003FA645093FFD41000C53B3 /* libSDL3.a */,
F3C17C6328E3FB2900E1A26D /* libSDL3.a */,
F3C17C6528E3FB2900E1A26D /* libSDL3.a */,
DB1D40D717B3F30D00D74CFC /* libSDL3.dylib */,
F3C17C6728E3FB2900E1A26D /* libSDL3.dylib */,
F3C17C6928E3FB2900E1A26D /* libSDL3.dylib */,
003FA649093FFD41000C53B3 /* SDL3 */,
);
name = Products;
sourceTree = "<group>";
@ -2298,80 +2298,80 @@
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
003FA643093FFD41000C53B3 /* SDL2.framework */ = {
003FA643093FFD41000C53B3 /* SDL3.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = SDL2.framework;
path = SDL3.framework;
remoteRef = 003FA642093FFD41000C53B3 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
003FA645093FFD41000C53B3 /* libSDL2.a */ = {
003FA645093FFD41000C53B3 /* libSDL3.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSDL2.a;
path = libSDL3.a;
remoteRef = 003FA644093FFD41000C53B3 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
003FA649093FFD41000C53B3 /* SDL2 */ = {
003FA649093FFD41000C53B3 /* SDL3 */ = {
isa = PBXReferenceProxy;
fileType = "compiled.mach-o.executable";
path = SDL2;
path = SDL3;
remoteRef = 003FA648093FFD41000C53B3 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
DB1D40D717B3F30D00D74CFC /* libSDL2.dylib */ = {
DB1D40D717B3F30D00D74CFC /* libSDL3.dylib */ = {
isa = PBXReferenceProxy;
fileType = "compiled.mach-o.dylib";
path = libSDL2.dylib;
path = libSDL3.dylib;
remoteRef = DB1D40D617B3F30D00D74CFC /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3C17C5D28E3FB2900E1A26D /* SDL2.framework */ = {
F3C17C5D28E3FB2900E1A26D /* SDL3.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = SDL2.framework;
path = SDL3.framework;
remoteRef = F3C17C5C28E3FB2900E1A26D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3C17C5F28E3FB2900E1A26D /* SDL2.framework */ = {
F3C17C5F28E3FB2900E1A26D /* SDL3.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = SDL2.framework;
path = SDL3.framework;
remoteRef = F3C17C5E28E3FB2900E1A26D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3C17C6128E3FB2900E1A26D /* SDL2.framework */ = {
F3C17C6128E3FB2900E1A26D /* SDL3.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = SDL2.framework;
path = SDL3.framework;
remoteRef = F3C17C6028E3FB2900E1A26D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3C17C6328E3FB2900E1A26D /* libSDL2.a */ = {
F3C17C6328E3FB2900E1A26D /* libSDL3.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSDL2.a;
path = libSDL3.a;
remoteRef = F3C17C6228E3FB2900E1A26D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3C17C6528E3FB2900E1A26D /* libSDL2.a */ = {
F3C17C6528E3FB2900E1A26D /* libSDL3.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSDL2.a;
path = libSDL3.a;
remoteRef = F3C17C6428E3FB2900E1A26D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3C17C6728E3FB2900E1A26D /* libSDL2.dylib */ = {
F3C17C6728E3FB2900E1A26D /* libSDL3.dylib */ = {
isa = PBXReferenceProxy;
fileType = "compiled.mach-o.dylib";
path = libSDL2.dylib;
path = libSDL3.dylib;
remoteRef = F3C17C6628E3FB2900E1A26D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3C17C6928E3FB2900E1A26D /* libSDL2.dylib */ = {
F3C17C6928E3FB2900E1A26D /* libSDL3.dylib */ = {
isa = PBXReferenceProxy;
fileType = "compiled.mach-o.dylib";
path = libSDL2.dylib;
path = libSDL3.dylib;
remoteRef = F3C17C6828E3FB2900E1A26D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};

View File

@ -9,6 +9,6 @@
// Include any optional config for this build
#include? "build.xcconfig"
CONFIG_FRAMEWORK_LDFLAGS[sdk=macos*] = $(inherited) -framework SDL2 -framework AudioToolbox -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreHaptics -framework CoreVideo -framework ForceFeedback -framework GameController -framework IOKit -framework Metal
CONFIG_FRAMEWORK_LDFLAGS[sdk=iphone*] = $(inherited) -framework SDL2 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit
CONFIG_FRAMEWORK_LDFLAGS[sdk=appletv*] = $(inherited) -framework SDL2 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit
CONFIG_FRAMEWORK_LDFLAGS[sdk=macos*] = $(inherited) -framework SDL3 -framework AudioToolbox -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreHaptics -framework CoreVideo -framework ForceFeedback -framework GameController -framework IOKit -framework Metal
CONFIG_FRAMEWORK_LDFLAGS[sdk=iphone*] = $(inherited) -framework SDL3 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit
CONFIG_FRAMEWORK_LDFLAGS[sdk=appletv*] = $(inherited) -framework SDL3 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit

View File

@ -11,7 +11,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include
# Add your application source files here...
LOCAL_SRC_FILES := YourSourceHere.c
LOCAL_SHARED_LIBRARIES := SDL2
LOCAL_SHARED_LIBRARIES := SDL3
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog

View File

@ -6,7 +6,7 @@ LOCAL_MODULE := main
LOCAL_SRC_FILES := YourSourceHere.c
LOCAL_STATIC_LIBRARIES := SDL2_static
LOCAL_STATIC_LIBRARIES := SDL3_static
include $(BUILD_SHARED_LIBRARY)
$(call import-module,SDL)LOCAL_PATH := $(call my-dir)

View File

@ -11,7 +11,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include
# Add your application source files here...
LOCAL_SRC_FILES := YourSourceHere.c
LOCAL_SHARED_LIBRARIES := SDL2
LOCAL_SHARED_LIBRARIES := SDL3
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid

View File

@ -2,12 +2,12 @@ cmake_minimum_required(VERSION 3.6)
project(MY_APP)
find_library(SDL2 SDL2)
find_library(SDL3 SDL3)
add_library(main SHARED)
target_sources(main PRIVATE YourSourceHere.c)
target_link_libraries(main SDL2)
target_link_libraries(main SDL3)

View File

@ -59,8 +59,8 @@ import java.util.Locale;
*/
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
private static final String TAG = "SDL";
private static final int SDL_MAJOR_VERSION = 2;
private static final int SDL_MINOR_VERSION = 26;
private static final int SDL_MAJOR_VERSION = 3;
private static final int SDL_MINOR_VERSION = 0;
private static final int SDL_MICRO_VERSION = 0;
/*
// Display InputType.SOURCE/CLASS of events and devices
@ -263,17 +263,17 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
* This method is called by SDL before loading the native shared libraries.
* It can be overridden to provide names of shared libraries to be loaded.
* The default implementation returns the defaults. It never returns null.
* An array returned by a new implementation must at least contain "SDL2".
* An array returned by a new implementation must at least contain "SDL3".
* Also keep in mind that the order the libraries are loaded may matter.
* @return names of shared libraries to be loaded (e.g. "SDL2", "main").
* @return names of shared libraries to be loaded (e.g. "SDL3", "main").
*/
protected String[] getLibraries() {
return new String[] {
"SDL2",
// "SDL2_image",
// "SDL2_mixer",
// "SDL2_net",
// "SDL2_ttf",
"SDL3",
// "SDL3_image",
// "SDL3_mixer",
// "SDL3_net",
// "SDL3_ttf",
"main"
};
}

View File

@ -61,8 +61,8 @@ build_cmake_projects() {
-DSDL_STATIC=ON \
-DSDL_STATIC_PIC=ON \
-DSDL_TEST=ON \
-DSDL2_DISABLE_SDL2MAIN=OFF \
-DSDL2_DISABLE_INSTALL=OFF \
-DSDL3_DISABLE_SDL3MAIN=OFF \
-DSDL3_DISABLE_INSTALL=OFF \
-DCMAKE_INSTALL_PREFIX="${build_root}/build_${android_abi}/prefix" \
-DCMAKE_INSTALL_INCLUDEDIR=include \
-DCMAKE_INSTALL_LIBDIR=lib \

View File

@ -69,5 +69,5 @@ ndk-build \
APP_BUILD_SCRIPT=Android.mk \
APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" \
APP_PLATFORM=android-16 \
APP_MODULES="SDL2 SDL2_main" \
APP_MODULES="SDL3 SDL3_main" \
$ndk_args

View File

@ -55,7 +55,7 @@ mkdir buildbot
pushd buildbot
echo "Configuring..."
emconfigure ../configure --host=wasm32-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-s USE_SDL=0 -O2 -Wno-warn-absolute-paths -Wdeclaration-after-statement -Werror=declaration-after-statement" --prefix="$PWD/emscripten-sdl2-installed" || exit $?
emconfigure ../configure --host=wasm32-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-s USE_SDL=0 -O2 -Wno-warn-absolute-paths -Wdeclaration-after-statement -Werror=declaration-after-statement" --prefix="$PWD/emscripten-sdl3-installed" || exit $?
echo "Building..."
emmake $MAKE || exit $?
@ -64,9 +64,9 @@ echo "Moving things around..."
emmake $MAKE install || exit $?
# Fix up a few things to a real install path
perl -w -pi -e "s#$PWD/emscripten-sdl2-installed#/usr/local#g;" ./emscripten-sdl2-installed/lib/libSDL2.la ./emscripten-sdl2-installed/lib/pkgconfig/sdl2.pc ./emscripten-sdl2-installed/bin/sdl2-config
perl -w -pi -e "s#$PWD/emscripten-sdl3-installed#/usr/local#g;" ./emscripten-sdl3-installed/lib/libSDL3.la ./emscripten-sdl3-installed/lib/pkgconfig/sdl3.pc ./emscripten-sdl3-installed/bin/sdl3-config
mkdir -p ./usr
mv ./emscripten-sdl2-installed ./usr/local
mv ./emscripten-sdl3-installed ./usr/local
tar -cJvvf $TARBALL usr
popd

View File

@ -1,6 +1,6 @@
#!/bin/bash
# This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
# This is the script buildbot.libsdl.org uses to cross-compile SDL3 from
# amd64 Linux to NaCl.
# PLEASE NOTE that we have reports that SDL built with pepper_49 (current
@ -44,13 +44,13 @@ export AR="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-ar"
export LD="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-ar"
export RANLIB="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-ranlib"
../configure --host=pnacl --prefix=$PWD/nacl-sdl2-installed
../configure --host=pnacl --prefix=$PWD/nacl-sdl3-installed
$MAKE
$MAKE install
# Fix up a few things to a real install path
perl -w -pi -e "s#$PWD/nacl-sdl2-installed#/usr/local#g;" ./nacl-sdl2-installed/lib/libSDL2.la ./nacl-sdl2-installed/lib/pkgconfig/sdl2.pc ./nacl-sdl2-installed/bin/sdl2-config
perl -w -pi -e "s#$PWD/nacl-sdl3-installed#/usr/local#g;" ./nacl-sdl3-installed/lib/libSDL3.la ./nacl-sdl3-installed/lib/pkgconfig/sdl3.pc ./nacl-sdl3-installed/bin/sdl3-config
mkdir -p ./usr
mv ./nacl-sdl2-installed ./usr/local
mv ./nacl-sdl3-installed ./usr/local
popd
tar -cJvvf $TARBALL -C $BUILDBOTDIR usr

View File

@ -39,7 +39,7 @@ CURDIR=`pwd -P`
SDLPATH="$( cd "$(dirname "$0")/.." ; pwd -P )"
BUILDPATH="$SDLPATH/build/nacl"
TESTBUILDPATH="$BUILDPATH/test"
SDL2_STATIC="$BUILDPATH/build/.libs/libSDL2.a"
SDL3_STATIC="$BUILDPATH/build/.libs/libSDL3.a"
mkdir -p $BUILDPATH
mkdir -p $TESTBUILDPATH
@ -73,8 +73,8 @@ $SDLPATH/configure --host=pnacl --prefix $TESTBUILDPATH
make -j$NCPUS CFLAGS="$CFLAGS -I./include"
make install
if [ ! -f "$SDL2_STATIC" ]; then
echo "Build failed! $SDL2_STATIC"
if [ ! -f "$SDL3_STATIC" ]; then
echo "Build failed! $SDL3_STATIC"
exit 1
fi
@ -83,7 +83,7 @@ cp -f $SDLPATH/test/nacl/* $TESTBUILDPATH
# Some tests need these resource files
cp -f $SDLPATH/test/*.bmp $TESTBUILDPATH
cp -f $SDLPATH/test/*.wav $TESTBUILDPATH
cp -f $SDL2_STATIC $TESTBUILDPATH
cp -f $SDL3_STATIC $TESTBUILDPATH
# Copy user sources
_SOURCES=($SOURCES)
@ -94,8 +94,8 @@ done
export SOURCES="$SOURCES"
cd $TESTBUILDPATH
make -j$NCPUS CONFIG="Release" CFLAGS="$CFLAGS -I$TESTBUILDPATH/include/SDL2 -I$SDLPATH/include"
make -j$NCPUS CONFIG="Debug" CFLAGS="$CFLAGS -I$TESTBUILDPATH/include/SDL2 -I$SDLPATH/include"
make -j$NCPUS CONFIG="Release" CFLAGS="$CFLAGS -I$TESTBUILDPATH/include/SDL3 -I$SDLPATH/include"
make -j$NCPUS CONFIG="Debug" CFLAGS="$CFLAGS -I$TESTBUILDPATH/include/SDL3 -I$SDLPATH/include"
echo
echo "Run the test with: "

View File

@ -1,13 +1,13 @@
#!/bin/bash
# This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
# This is the script buildbot.libsdl.org uses to cross-compile SDL3 from
# x86 Linux to Raspberry Pi.
# The final tarball can be unpacked in the root directory of a RPi,
# so the SDL2 install lands in /usr/local. Run ldconfig, and then
# you should be able to build and run SDL2-based software on your
# so the SDL3 install lands in /usr/local. Run ldconfig, and then
# you should be able to build and run SDL3-based software on your
# Pi. Standard configure scripts should be able to find SDL and
# build against it, and sdl2-config should work correctly on the
# build against it, and sdl3-config should work correctly on the
# actual device.
TARBALL="$1"
@ -42,13 +42,13 @@ SYSROOT="/opt/rpi-sysroot"
export CC="ccache /opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux -L$SYSROOT/opt/vc/lib"
# -L$SYSROOT/usr/lib/arm-linux-gnueabihf"
# !!! FIXME: shouldn't have to --disable-* things here.
../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd --disable-video-wayland
../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl3-installed --disable-pulseaudio --disable-esd --disable-video-wayland
$MAKE
$MAKE install
# Fix up a few things to a real install path on a real Raspberry Pi...
perl -w -pi -e "s#$PWD/rpi-sdl2-installed#/usr/local#g;" ./rpi-sdl2-installed/lib/libSDL2.la ./rpi-sdl2-installed/lib/pkgconfig/sdl2.pc ./rpi-sdl2-installed/bin/sdl2-config
perl -w -pi -e "s#$PWD/rpi-sdl3-installed#/usr/local#g;" ./rpi-sdl3-installed/lib/libSDL3.la ./rpi-sdl3-installed/lib/pkgconfig/sdl3.pc ./rpi-sdl3-installed/bin/sdl3-config
mkdir -p ./usr
mv ./rpi-sdl2-installed ./usr/local
mv ./rpi-sdl3-installed ./usr/local
tar -cJvvf $TARBALL usr
popd

View File

@ -16,9 +16,9 @@ mkdir zipper\SDL
mkdir zipper\SDL\include
mkdir zipper\SDL\lib
copy include\*.h include\
copy %2\%1\Release\SDL2.dll zipper\SDL\lib\
copy %2\%1\Release\SDL2.lib zipper\SDL\lib\
copy %2\%1\Release\SDL2main.lib zipper\SDL\lib\
copy %2\%1\Release\SDL3.dll zipper\SDL\lib\
copy %2\%1\Release\SDL3.lib zipper\SDL\lib\
copy %2\%1\Release\SDL3main.lib zipper\SDL\lib\
cd zipper
zip -9r ..\%3 SDL
cd ..

View File

@ -92,7 +92,7 @@ macro(LISTTOSTRREV _LIST _OUTPUT)
endforeach()
endmacro()
if(CMAKE_VERSION VERSION_LESS 3.16.0 OR SDL2_SUBPROJECT)
if(CMAKE_VERSION VERSION_LESS 3.16.0 OR SDL3_SUBPROJECT)
# - CMake versions <3.16 do not support the OBJC language
# - When SDL is built as a subproject and when the main project does not enable OBJC,
# CMake fails due to missing internal CMake variables (CMAKE_OBJC_COMPILE_OBJECT)

View File

@ -65,7 +65,7 @@ macro(CheckOSS)
if(HAVE_OSS_SYS_SOUNDCARD_H)
set(HAVE_OSS TRUE)
file(GLOB OSS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/dsp/*.c)
file(GLOB OSS_SOURCES ${SDL3_SOURCE_DIR}/src/audio/dsp/*.c)
set(SDL_AUDIO_DRIVER_OSS 1)
list(APPEND SOURCE_FILES ${OSS_SOURCES})
if(NETBSD)
@ -89,7 +89,7 @@ macro(CheckALSA)
endif()
if(HAVE_LIBASOUND)
set(HAVE_ALSA TRUE)
file(GLOB ALSA_SOURCES ${SDL2_SOURCE_DIR}/src/audio/alsa/*.c)
file(GLOB ALSA_SOURCES ${SDL3_SOURCE_DIR}/src/audio/alsa/*.c)
list(APPEND SOURCE_FILES ${ALSA_SOURCES})
set(SDL_AUDIO_DRIVER_ALSA 1)
if(SDL_ALSA_SHARED AND NOT HAVE_SDL_LOADSO)
@ -117,7 +117,7 @@ macro(CheckPipewire)
pkg_check_modules(PKG_PIPEWIRE libpipewire-0.3>=0.3.20)
if(PKG_PIPEWIRE_FOUND)
set(HAVE_PIPEWIRE TRUE)
file(GLOB PIPEWIRE_SOURCES ${SDL2_SOURCE_DIR}/src/audio/pipewire/*.c)
file(GLOB PIPEWIRE_SOURCES ${SDL3_SOURCE_DIR}/src/audio/pipewire/*.c)
list(APPEND SOURCE_FILES ${PIPEWIRE_SOURCES})
set(SDL_AUDIO_DRIVER_PIPEWIRE 1)
list(APPEND EXTRA_CFLAGS ${PKG_PIPEWIRE_CFLAGS})
@ -146,7 +146,7 @@ macro(CheckPulseAudio)
pkg_check_modules(PKG_PULSEAUDIO libpulse-simple)
if(PKG_PULSEAUDIO_FOUND)
set(HAVE_PULSEAUDIO TRUE)
file(GLOB PULSEAUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/pulseaudio/*.c)
file(GLOB PULSEAUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/pulseaudio/*.c)
list(APPEND SOURCE_FILES ${PULSEAUDIO_SOURCES})
set(SDL_AUDIO_DRIVER_PULSEAUDIO 1)
list(APPEND EXTRA_CFLAGS ${PKG_PULSEAUDIO_CFLAGS})
@ -175,7 +175,7 @@ macro(CheckJACK)
pkg_check_modules(PKG_JACK jack)
if(PKG_JACK_FOUND)
set(HAVE_JACK TRUE)
file(GLOB JACK_SOURCES ${SDL2_SOURCE_DIR}/src/audio/jack/*.c)
file(GLOB JACK_SOURCES ${SDL3_SOURCE_DIR}/src/audio/jack/*.c)
list(APPEND SOURCE_FILES ${JACK_SOURCES})
set(SDL_AUDIO_DRIVER_JACK 1)
list(APPEND EXTRA_CFLAGS ${PKG_JACK_CFLAGS})
@ -204,7 +204,7 @@ macro(CheckESD)
pkg_check_modules(PKG_ESD esound)
if(PKG_ESD_FOUND)
set(HAVE_ESD TRUE)
file(GLOB ESD_SOURCES ${SDL2_SOURCE_DIR}/src/audio/esd/*.c)
file(GLOB ESD_SOURCES ${SDL3_SOURCE_DIR}/src/audio/esd/*.c)
list(APPEND SOURCE_FILES ${ESD_SOURCES})
set(SDL_AUDIO_DRIVER_ESD 1)
list(APPEND EXTRA_CFLAGS ${PKG_ESD_CFLAGS})
@ -237,7 +237,7 @@ macro(CheckARTS)
list(APPEND EXTRA_CFLAGS ${ARTS_CFLAGS})
execute_process(CMD_ARTSLIBS ${ARTS_CONFIG} --libs
OUTPUT_VARIABLE ARTS_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
file(GLOB ARTS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/arts/*.c)
file(GLOB ARTS_SOURCES ${SDL3_SOURCE_DIR}/src/audio/arts/*.c)
list(APPEND SOURCE_FILES ${ARTS_SOURCES})
set(SDL_AUDIO_DRIVER_ARTS 1)
set(HAVE_ARTS TRUE)
@ -269,7 +269,7 @@ macro(CheckNAS)
find_library(D_NAS_LIB audio)
if(HAVE_NAS_H AND D_NAS_LIB)
set(HAVE_NAS TRUE)
file(GLOB NAS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/nas/*.c)
file(GLOB NAS_SOURCES ${SDL3_SOURCE_DIR}/src/audio/nas/*.c)
list(APPEND SOURCE_FILES ${NAS_SOURCES})
set(SDL_AUDIO_DRIVER_NAS 1)
if(SDL_NAS_SHARED AND NOT HAVE_SDL_LOADSO)
@ -297,7 +297,7 @@ macro(CheckSNDIO)
pkg_check_modules(PKG_SNDIO sndio)
if(PKG_SNDIO_FOUND)
set(HAVE_SNDIO TRUE)
file(GLOB SNDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/sndio/*.c)
file(GLOB SNDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/sndio/*.c)
list(APPEND SOURCE_FILES ${SNDIO_SOURCES})
set(SDL_AUDIO_DRIVER_SNDIO 1)
list(APPEND EXTRA_CFLAGS ${PKG_SNDIO_CFLAGS})
@ -326,7 +326,7 @@ macro(CheckFusionSound)
pkg_check_modules(PKG_FUSIONSOUND fusionsound>=1.0.0)
if(PKG_FUSIONSOUND_FOUND)
set(HAVE_FUSIONSOUND TRUE)
file(GLOB FUSIONSOUND_SOURCES ${SDL2_SOURCE_DIR}/src/audio/fusionsound/*.c)
file(GLOB FUSIONSOUND_SOURCES ${SDL3_SOURCE_DIR}/src/audio/fusionsound/*.c)
list(APPEND SOURCE_FILES ${FUSIONSOUND_SOURCES})
set(SDL_AUDIO_DRIVER_FUSIONSOUND 1)
list(APPEND EXTRA_CFLAGS ${PKG_FUSIONSOUND_CFLAGS})
@ -442,7 +442,7 @@ macro(CheckX11)
set(HAVE_X11 TRUE)
set(HAVE_SDL_VIDEO TRUE)
file(GLOB X11_SOURCES ${SDL2_SOURCE_DIR}/src/video/x11/*.c)
file(GLOB X11_SOURCES ${SDL3_SOURCE_DIR}/src/video/x11/*.c)
list(APPEND SOURCE_FILES ${X11_SOURCES})
set(SDL_VIDEO_DRIVER_X11 1)
@ -662,17 +662,17 @@ macro(CheckWayland)
set(HAVE_WAYLAND TRUE)
set(HAVE_SDL_VIDEO TRUE)
file(GLOB WAYLAND_SOURCES ${SDL2_SOURCE_DIR}/src/video/wayland/*.c)
file(GLOB WAYLAND_SOURCES ${SDL3_SOURCE_DIR}/src/video/wayland/*.c)
list(APPEND SOURCE_FILES ${WAYLAND_SOURCES})
# We have to generate some protocol interface code for some unstable Wayland features.
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
target_include_directories(sdl-build-options INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
file(GLOB WAYLAND_PROTOCOLS_XML RELATIVE "${SDL2_SOURCE_DIR}/wayland-protocols/" "${SDL2_SOURCE_DIR}/wayland-protocols/*.xml")
file(GLOB WAYLAND_PROTOCOLS_XML RELATIVE "${SDL3_SOURCE_DIR}/wayland-protocols/" "${SDL3_SOURCE_DIR}/wayland-protocols/*.xml")
foreach(_XML ${WAYLAND_PROTOCOLS_XML})
string(REGEX REPLACE "\\.xml$" "" _PROTL "${_XML}")
WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_SCANNER_CODE_MODE}" "${SDL2_SOURCE_DIR}/wayland-protocols/${_XML}" "${_PROTL}")
WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_SCANNER_CODE_MODE}" "${SDL3_SOURCE_DIR}/wayland-protocols/${_XML}" "${_PROTL}")
endforeach()
if(SDL_WAYLAND_QT_TOUCH)
@ -731,7 +731,7 @@ macro(CheckCOCOA)
set(HAVE_COCOA TRUE)
endif()
if(HAVE_COCOA)
file(GLOB COCOA_SOURCES ${SDL2_SOURCE_DIR}/src/video/cocoa/*.m)
file(GLOB COCOA_SOURCES ${SDL3_SOURCE_DIR}/src/video/cocoa/*.m)
list(APPEND SOURCE_FILES ${COCOA_SOURCES})
set(SDL_VIDEO_DRIVER_COCOA 1)
set(HAVE_SDL_VIDEO TRUE)
@ -749,7 +749,7 @@ macro(CheckDirectFB)
pkg_check_modules(PKG_DIRECTFB directfb>=1.0.0)
if(PKG_DIRECTFB_FOUND)
set(HAVE_DIRECTFB TRUE)
file(GLOB DIRECTFB_SOURCES ${SDL2_SOURCE_DIR}/src/video/directfb/*.c)
file(GLOB DIRECTFB_SOURCES ${SDL3_SOURCE_DIR}/src/video/directfb/*.c)
list(APPEND SOURCE_FILES ${DIRECTFB_SOURCES})
set(SDL_VIDEO_DRIVER_DIRECTFB 1)
set(SDL_VIDEO_RENDER_DIRECTFB 1)
@ -786,7 +786,7 @@ macro(CheckVivante)
set(HAVE_VIVANTE TRUE)
set(HAVE_SDL_VIDEO TRUE)
file(GLOB VIVANTE_SOURCES ${SDL2_SOURCE_DIR}/src/video/vivante/*.c)
file(GLOB VIVANTE_SOURCES ${SDL3_SOURCE_DIR}/src/video/vivante/*.c)
list(APPEND SOURCE_FILES ${VIVANTE_SOURCES})
set(SDL_VIDEO_DRIVER_VIVANTE 1)
if(HAVE_VIVANTE_VDK)
@ -1000,17 +1000,17 @@ macro(CheckPTHREAD)
endif()
set(SOURCE_FILES ${SOURCE_FILES}
${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_systhread.c
${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_sysmutex.c # Can be faked, if necessary
${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_syscond.c # Can be faked, if necessary
${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_systls.c
${SDL3_SOURCE_DIR}/src/thread/pthread/SDL_systhread.c
${SDL3_SOURCE_DIR}/src/thread/pthread/SDL_sysmutex.c # Can be faked, if necessary
${SDL3_SOURCE_DIR}/src/thread/pthread/SDL_syscond.c # Can be faked, if necessary
${SDL3_SOURCE_DIR}/src/thread/pthread/SDL_systls.c
)
if(HAVE_PTHREADS_SEM)
set(SOURCE_FILES ${SOURCE_FILES}
${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_syssem.c)
${SDL3_SOURCE_DIR}/src/thread/pthread/SDL_syssem.c)
else()
set(SOURCE_FILES ${SOURCE_FILES}
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syssem.c)
${SDL3_SOURCE_DIR}/src/thread/generic/SDL_syssem.c)
endif()
set(HAVE_SDL_THREADS TRUE)
endif()
@ -1147,7 +1147,7 @@ macro(CheckUSBHID)
set(SDL_HAVE_MACHINE_JOYSTICK_H 1)
endif()
set(SDL_JOYSTICK_USBHID 1)
file(GLOB BSD_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/bsd/*.c)
file(GLOB BSD_JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/bsd/*.c)
list(APPEND SOURCE_FILES ${BSD_JOYSTICK_SOURCES})
list(APPEND EXTRA_CFLAGS ${USB_CFLAGS})
list(APPEND EXTRA_LIBS ${USB_LIBS})
@ -1191,10 +1191,10 @@ macro(CheckHIDAPI)
if(HAVE_HIDAPI)
if(ANDROID)
list(APPEND SOURCE_FILES ${SDL2_SOURCE_DIR}/src/hidapi/android/hid.cpp)
list(APPEND SOURCE_FILES ${SDL3_SOURCE_DIR}/src/hidapi/android/hid.cpp)
endif()
if(IOS OR TVOS)
list(APPEND SOURCE_FILES ${SDL2_SOURCE_DIR}/src/hidapi/ios/hid.m)
list(APPEND SOURCE_FILES ${SDL3_SOURCE_DIR}/src/hidapi/ios/hid.m)
set(SDL_FRAMEWORK_COREBLUETOOTH 1)
endif()
set(HAVE_SDL_HIDAPI TRUE)
@ -1203,7 +1203,7 @@ macro(CheckHIDAPI)
set(SDL_JOYSTICK_HIDAPI 1)
set(HAVE_SDL_JOYSTICK TRUE)
set(HAVE_HIDAPI_JOYSTICK TRUE)
file(GLOB HIDAPI_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
file(GLOB HIDAPI_JOYSTICK_SOURCES ${SDL3_SOURCE_DIR}/src/joystick/hidapi/*.c)
list(APPEND SOURCE_FILES ${HIDAPI_JOYSTICK_SOURCES})
endif()
else()
@ -1244,7 +1244,7 @@ macro(CheckRPI)
if(SDL_VIDEO AND HAVE_RPI)
set(HAVE_SDL_VIDEO TRUE)
set(SDL_VIDEO_DRIVER_RPI 1)
file(GLOB VIDEO_RPI_SOURCES ${SDL2_SOURCE_DIR}/src/video/raspberry/*.c)
file(GLOB VIDEO_RPI_SOURCES ${SDL3_SOURCE_DIR}/src/video/raspberry/*.c)
list(APPEND SOURCE_FILES ${VIDEO_RPI_SOURCES})
list(APPEND EXTRA_LIBS ${VIDEO_RPI_LIBRARIES})
# !!! FIXME: shouldn't be using CMAKE_C_FLAGS, right?
@ -1269,7 +1269,7 @@ macro(CheckKMSDRM)
set(HAVE_KMSDRM TRUE)
set(HAVE_SDL_VIDEO TRUE)
file(GLOB KMSDRM_SOURCES ${SDL2_SOURCE_DIR}/src/video/kmsdrm/*.c)
file(GLOB KMSDRM_SOURCES ${SDL3_SOURCE_DIR}/src/video/kmsdrm/*.c)
list(APPEND SOURCE_FILES ${KMSDRM_SOURCES})
list(APPEND EXTRA_CFLAGS ${PKG_KMSDRM_CFLAGS})

View File

@ -16,109 +16,109 @@ endif()
cmake_policy(SET CMP0074 NEW)
# Override CMAKE_FIND_ROOT_PATH_MODE to allow search for SDL2 outside of sysroot
# Override CMAKE_FIND_ROOT_PATH_MODE to allow search for SDL3 outside of sysroot
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER)
include(FeatureSummary)
option(TEST_SHARED "Test linking to shared SDL2 library" ON)
option(TEST_SHARED "Test linking to shared SDL3 library" ON)
add_feature_info("TEST_SHARED" TEST_SHARED "Test linking with shared library")
option(TEST_STATIC "Test linking to static SDL2 library" ON)
option(TEST_STATIC "Test linking to static SDL3 library" ON)
add_feature_info("TEST_STATIC" TEST_STATIC "Test linking with static library")
if(TEST_SHARED)
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2)
find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3)
if(EMSCRIPTEN OR (WIN32 AND NOT WINDOWS_STORE))
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3main)
endif()
add_executable(gui-shared WIN32 main_gui.c)
if(TARGET SDL2::SDL2main)
target_link_libraries(gui-shared PRIVATE SDL2::SDL2main)
if(TARGET SDL3::SDL3main)
target_link_libraries(gui-shared PRIVATE SDL3::SDL3main)
endif()
target_link_libraries(gui-shared PRIVATE SDL2::SDL2)
target_link_libraries(gui-shared PRIVATE SDL3::SDL3)
if(WIN32)
add_custom_command(TARGET gui-shared POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:SDL2::SDL2>" "$<TARGET_FILE_DIR:gui-shared>"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:SDL3::SDL3>" "$<TARGET_FILE_DIR:gui-shared>"
)
endif()
add_library(sharedlib-shared SHARED main_lib.c)
target_link_libraries(sharedlib-shared PRIVATE SDL2::SDL2)
target_link_libraries(sharedlib-shared PRIVATE SDL3::SDL3)
generate_export_header(sharedlib-shared EXPORT_MACRO_NAME MYLIBRARY_EXPORT)
target_compile_definitions(sharedlib-shared PRIVATE "EXPORT_HEADER=\"${CMAKE_CURRENT_BINARY_DIR}/sharedlib-shared_export.h\"")
set_target_properties(sharedlib-shared PROPERTIES C_VISIBILITY_PRESET "hidden")
add_executable(gui-shared-vars WIN32 main_gui.c)
target_link_libraries(gui-shared-vars PRIVATE ${SDL2_LIBRARIES})
target_include_directories(gui-shared-vars PRIVATE ${SDL2_INCLUDE_DIRS})
target_link_libraries(gui-shared-vars PRIVATE ${SDL3_LIBRARIES})
target_include_directories(gui-shared-vars PRIVATE ${SDL3_INCLUDE_DIRS})
add_executable(cli-shared main_cli.c)
target_link_libraries(cli-shared PRIVATE SDL2::SDL2)
target_link_libraries(cli-shared PRIVATE SDL3::SDL3)
if(WIN32)
add_custom_command(TARGET cli-shared POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:SDL2::SDL2>" "$<TARGET_FILE_DIR:cli-shared>"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:SDL3::SDL3>" "$<TARGET_FILE_DIR:cli-shared>"
)
endif()
# SDL2_LIBRARIES does not support creating a cli SDL2 application
# (it is possible that SDL2main is a stub, but we don't know for sure)
if(NOT TARGET SDL2::SDL2main)
# SDL3_LIBRARIES does not support creating a cli SDL3 application
# (it is possible that SDL3main is a stub, but we don't know for sure)
if(NOT TARGET SDL3::SDL3main)
add_executable(cli-shared-vars main_cli.c)
target_link_libraries(cli-shared-vars PRIVATE ${SDL2_LIBRARIES})
target_include_directories(cli-shared-vars PRIVATE ${SDL2_INCLUDE_DIRS})
target_link_libraries(cli-shared-vars PRIVATE ${SDL3_LIBRARIES})
target_include_directories(cli-shared-vars PRIVATE ${SDL3_INCLUDE_DIRS})
endif()
add_library(sharedlib-shared-vars SHARED main_lib.c)
target_link_libraries(sharedlib-shared-vars PRIVATE ${SDL2_LIBRARIES})
target_include_directories(sharedlib-shared-vars PRIVATE ${SDL2_INCLUDE_DIRS})
target_link_libraries(sharedlib-shared-vars PRIVATE ${SDL3_LIBRARIES})
target_include_directories(sharedlib-shared-vars PRIVATE ${SDL3_INCLUDE_DIRS})
generate_export_header(sharedlib-shared-vars EXPORT_MACRO_NAME MYLIBRARY_EXPORT)
target_compile_definitions(sharedlib-shared-vars PRIVATE "EXPORT_HEADER=\"${CMAKE_CURRENT_BINARY_DIR}/sharedlib-shared-vars_export.h\"")
set_target_properties(sharedlib-shared-vars PROPERTIES C_VISIBILITY_PRESET "hidden")
endif()
if(TEST_STATIC)
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2-static)
find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3-static)
if(EMSCRIPTEN OR (WIN32 AND NOT WINDOWS_STORE))
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3main)
endif()
add_executable(gui-static WIN32 main_gui.c)
if(TARGET SDL2::SDL2main)
target_link_libraries(gui-static PRIVATE SDL2::SDL2main)
if(TARGET SDL3::SDL3main)
target_link_libraries(gui-static PRIVATE SDL3::SDL3main)
endif()
target_link_libraries(gui-static PRIVATE SDL2::SDL2-static)
target_link_libraries(gui-static PRIVATE SDL3::SDL3-static)
option(SDL_STATIC_PIC "SDL static library has been built with PIC")
if(SDL_STATIC_PIC OR WIN32)
add_library(sharedlib-static SHARED main_lib.c)
target_link_libraries(sharedlib-static PRIVATE SDL2::SDL2-static)
target_link_libraries(sharedlib-static PRIVATE SDL3::SDL3-static)
generate_export_header(sharedlib-static EXPORT_MACRO_NAME MYLIBRARY_EXPORT)
target_compile_definitions(sharedlib-static PRIVATE "EXPORT_HEADER=\"${CMAKE_CURRENT_BINARY_DIR}/sharedlib-static_export.h\"")
set_target_properties(sharedlib-static PROPERTIES C_VISIBILITY_PRESET "hidden")
endif()
add_executable(gui-static-vars WIN32 main_gui.c)
target_link_libraries(gui-static-vars PRIVATE ${SDL2MAIN_LIBRARY} ${SDL2_STATIC_LIBRARIES})
target_include_directories(gui-static-vars PRIVATE ${SDL2_INCLUDE_DIRS})
target_link_libraries(gui-static-vars PRIVATE ${SDL3MAIN_LIBRARY} ${SDL3_STATIC_LIBRARIES})
target_include_directories(gui-static-vars PRIVATE ${SDL3_INCLUDE_DIRS})
add_executable(cli-static main_cli.c)
target_link_libraries(cli-static PRIVATE SDL2::SDL2-static)
target_link_libraries(cli-static PRIVATE SDL3::SDL3-static)
# SDL2_LIBRARIES does not support creating a cli SDL2 application (when SDL2::SDL2main is available)
# (it is possible that SDL2main is a stub, but we don't know for sure)
if(NOT TARGET SDL2::SDL2main)
# SDL3_LIBRARIES does not support creating a cli SDL3 application (when SDL3::SDL3main is available)
# (it is possible that SDL3main is a stub, but we don't know for sure)
if(NOT TARGET SDL3::SDL3main)
add_executable(cli-static-vars main_cli.c)
target_link_libraries(cli-static-vars PRIVATE ${SDL2_STATIC_LIBRARIES})
target_include_directories(cli-static-vars PRIVATE ${SDL2_INCLUDE_DIRS})
target_link_libraries(cli-static-vars PRIVATE ${SDL3_STATIC_LIBRARIES})
target_include_directories(cli-static-vars PRIVATE ${SDL3_INCLUDE_DIRS})
endif()
endif()
message(STATUS "SDL2_PREFIX: ${SDL2_PREFIX}")
message(STATUS "SDL2_INCLUDE_DIR: ${SDL2_INCLUDE_DIR}")
message(STATUS "SDL2_INCLUDE_DIRS: ${SDL2_INCLUDE_DIRS}")
message(STATUS "SDL2_LIBRARIES: ${SDL2_LIBRARIES}")
message(STATUS "SDL2_STATIC_LIBRARIES: ${SDL2_STATIC_LIBRARIES}")
message(STATUS "SDL2MAIN_LIBRARY: ${SDL2MAIN_LIBRARY}")
message(STATUS "SDL2TEST_LIBRARY: ${SDL2TEST_LIBRARY}")
message(STATUS "SDL3_PREFIX: ${SDL3_PREFIX}")
message(STATUS "SDL3_INCLUDE_DIR: ${SDL3_INCLUDE_DIR}")
message(STATUS "SDL3_INCLUDE_DIRS: ${SDL3_INCLUDE_DIRS}")
message(STATUS "SDL3_LIBRARIES: ${SDL3_LIBRARIES}")
message(STATUS "SDL3_STATIC_LIBRARIES: ${SDL3_STATIC_LIBRARIES}")
message(STATUS "SDL3MAIN_LIBRARY: ${SDL3MAIN_LIBRARY}")
message(STATUS "SDL3TEST_LIBRARY: ${SDL3TEST_LIBRARY}")
feature_summary(WHAT ALL)

View File

@ -4,8 +4,8 @@ include $(CLEAR_VARS)
LOCAL_MODULE := main_gui_androidmk
LOCAL_SRC_FILES := ../main_gui.c
LOCAL_SHARED_LIBRARIES += SDL2
LOCAL_SHARED_LIBRARIES += SDL3
include $(BUILD_SHARED_LIBRARY)
$(call import-module,SDL2main)
$(call import-module,SDL2)
$(call import-module,SDL3main)
$(call import-module,SDL3)

View File

@ -5,7 +5,7 @@
int main(int argc, char *argv[]) {
SDL_SetMainReady();
if (SDL_Init(0) < 0) {
fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError());
fprintf(stderr, "Could not initialize SDL: %s\n", SDL_GetError());
return 1;
}
SDL_Delay(100);

View File

@ -5,11 +5,11 @@ int main(int argc, char *argv[]) {
SDL_Window *window = NULL;
SDL_Surface *screenSurface = NULL;
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError());
fprintf(stderr, "Could not initialize SDL: %s\n", SDL_GetError());
return 1;
}
window = SDL_CreateWindow(
"hello_sdl2",
"Hello SDL",
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
640, 480,
SDL_WINDOW_SHOWN

View File

@ -17,7 +17,7 @@ int MYLIBRARY_EXPORT mylibrary_work(void);
int mylibrary_init(void) {
SDL_SetMainReady();
if (SDL_Init(0) < 0) {
fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError());
fprintf(stderr, "Could not initialize SDL: %s\n", SDL_GetError());
return 1;
}
return 0;

View File

@ -25,9 +25,9 @@ set -e
# Get the canonical path of the folder containing this script
testdir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
CFLAGS="$( pkg-config sdl2 --cflags )"
LDFLAGS="$( pkg-config sdl2 --libs )"
STATIC_LDFLAGS="$( pkg-config sdl2 --libs --static )"
CFLAGS="$( pkg-config sdl3 --cflags )"
LDFLAGS="$( pkg-config sdl3 --libs )"
STATIC_LDFLAGS="$( pkg-config sdl3 --libs --static )"
compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_pkgconfig.c.o $CFLAGS $EXTRA_CFLAGS"
link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig${EXESUFFIX} $LDFLAGS $EXTRA_LDFLAGS"

View File

@ -25,9 +25,9 @@ set -e
# Get the canonical path of the folder containing this script
testdir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
CFLAGS="$( sdl2-config --cflags )"
LDFLAGS="$( sdl2-config --libs )"
STATIC_LDFLAGS="$( sdl2-config --static-libs )"
CFLAGS="$( sdl3-config --cflags )"
LDFLAGS="$( sdl3-config --libs )"
STATIC_LDFLAGS="$( sdl3-config --static-libs )"
compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_sdlconfig.c.o $CFLAGS $EXTRA_CFLAGS"
link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig${EXESUFFIX} $LDFLAGS $EXTRA_LDFLAGS"

64
configure vendored
View File

@ -684,7 +684,7 @@ SDL_CFLAGS
bin_prefix_relpath
cmake_prefix_relpath
SDL_VENDOR_INFO
INSTALL_SDL2_CONFIG
INSTALL_SDL3_CONFIG
LIBUSB_LIBS
LIBUSB_CFLAGS
IBUS_LIBS
@ -954,7 +954,7 @@ enable_backgrounding_signal
enable_foregrounding_signal
enable_joystick_virtual
enable_render_d3d
enable_sdl2_config
enable_sdl3_config
enable_vendor_info
'
ac_precious_vars='build_alias
@ -1782,7 +1782,7 @@ Optional Features:
--enable-joystick-virtual
enable virtual joystick APIs [default=yes]
--enable-render-d3d enable the Direct3D render driver [default=yes]
--enable-sdl2-config Install sdl2-config [default=yes]
--enable-sdl3-config Install sdl3-config [default=yes]
--enable-vendor-info=STRING
Add vendor info to SDL_REVISION
@ -3452,8 +3452,8 @@ ac_config_headers="$ac_config_headers include/SDL_config.h"
orig_CFLAGS="$CFLAGS"
# See docs/release_checklist.md
SDL_MAJOR_VERSION=2
SDL_MINOR_VERSION=26
SDL_MAJOR_VERSION=3
SDL_MINOR_VERSION=0
SDL_MICRO_VERSION=0
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
@ -13073,9 +13073,9 @@ CFLAGS=$lt_save_CFLAGS
# For historical reasons, the library name redundantly includes the major
# version twice: libSDL2-2.0.so.0.
# version twice: libSDL3-3.0.so.0.
# TODO: in SDL 3, stop using -release, which will simplify it to libSDL3.so.0
LT_RELEASE=2.0
LT_RELEASE=3.0
# Increment this if there is an incompatible change - but if that happens,
# we should rename the library from SDL2 to SDL3, at which point this would
# reset to 0 anyway.
@ -18276,7 +18276,7 @@ EXTRA_LDFLAGS="$BASE_LDFLAGS"
# fi
#done
SDL_CFLAGS="$BASE_CFLAGS"
SDL_LIBS="-lSDL2"
SDL_LIBS="-lSDL3"
if test "x$BASE_LDFLAGS" != x; then
SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS"
fi
@ -28848,7 +28848,7 @@ printf "%s\n" "#define SDL_LOADSO_WINDOWS 1" >>confdefs.h
VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
SDL_LIBS="-lSDL2main $SDL_LIBS -mwindows"
SDL_LIBS="-lSDL3main $SDL_LIBS -mwindows"
# Check to see if this is a mingw or cygwin build
have_mingw32=
@ -29464,29 +29464,29 @@ esac
CheckVirtualJoystick
# Check whether to install sdl2-config
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to install sdl2-config" >&5
printf %s "checking whether to install sdl2-config... " >&6; }
# Check whether --enable-sdl2-config was given.
if test ${enable_sdl2_config+y}
# Check whether to install sdl3-config
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to install sdl3-config" >&5
printf %s "checking whether to install sdl3-config... " >&6; }
# Check whether --enable-sdl3-config was given.
if test ${enable_sdl3_config+y}
then :
enableval=$enable_sdl2_config; case "${enableval}" in
yes) enable_sdl2_config="TRUE" ;;
no) enable_sdl2_config="FALSE" ;;
*) as_fn_error $? "bad value '${enableval}' for --enable-sdl2-config" "$LINENO" 5 ;;
enableval=$enable_sdl3_config; case "${enableval}" in
yes) enable_sdl3_config="TRUE" ;;
no) enable_sdl3_config="FALSE" ;;
*) as_fn_error $? "bad value '${enableval}' for --enable-sdl3-config" "$LINENO" 5 ;;
esac
else $as_nop
enable_sdl2_config="TRUE"
enable_sdl3_config="TRUE"
fi
if test "$enable_sdl2_config" = "TRUE"; then
if test "$enable_sdl3_config" = "TRUE"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
INSTALL_SDL2_CONFIG=$enable_sdl2_config
INSTALL_SDL3_CONFIG=$enable_sdl3_config
# Check whether --enable-vendor-info was given.
@ -29700,7 +29700,7 @@ fi
SDL_STATIC_LIBS="$EXTRA_LDFLAGS"
pkg_cmakedir='$libdir/cmake/SDL2'
pkg_cmakedir='$libdir/cmake/SDL3'
for _lcl_i in pkg_cmakedir:prefix:cmake_prefix_relpath bindir:prefix:bin_prefix_relpath; do
_lcl_from=\$`echo "$_lcl_i" | sed 's,:.*$,,'`
_lcl_to=\$`echo "$_lcl_i" | sed 's,^[^:]*:,,' | sed 's,:[^:]*$,,'`
@ -29852,12 +29852,12 @@ $SDLTEST_DEPENDS
$WAYLAND_PROTOCOLS_DEPENDS
__EOF__
ac_config_files="$ac_config_files Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake sdl2-config-version.cmake SDL2.spec sdl2.pc"
ac_config_files="$ac_config_files Makefile:Makefile.in:Makefile.rules sdl3-config sdl3-config.cmake sdl3-config-version.cmake SDL3.spec sdl3.pc"
ac_config_commands="$ac_config_commands sdl2_config"
ac_config_commands="$ac_config_commands sdl3_config"
SUMMARY="SDL2 Configure Summary:\n"
SUMMARY="SDL3 Configure Summary:\n"
if test x$enable_shared = xyes; then
SUMMARY="${SUMMARY}Building Shared Libraries\n"
fi
@ -31093,12 +31093,12 @@ do
"include/SDL_config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/SDL_config.h" ;;
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:Makefile.in:Makefile.rules" ;;
"sdl2-config") CONFIG_FILES="$CONFIG_FILES sdl2-config" ;;
"sdl2-config.cmake") CONFIG_FILES="$CONFIG_FILES sdl2-config.cmake" ;;
"sdl2-config-version.cmake") CONFIG_FILES="$CONFIG_FILES sdl2-config-version.cmake" ;;
"SDL2.spec") CONFIG_FILES="$CONFIG_FILES SDL2.spec" ;;
"sdl2.pc") CONFIG_FILES="$CONFIG_FILES sdl2.pc" ;;
"sdl2_config") CONFIG_COMMANDS="$CONFIG_COMMANDS sdl2_config" ;;
"sdl3-config") CONFIG_FILES="$CONFIG_FILES sdl3-config" ;;
"sdl3-config.cmake") CONFIG_FILES="$CONFIG_FILES sdl3-config.cmake" ;;
"sdl3-config-version.cmake") CONFIG_FILES="$CONFIG_FILES sdl3-config-version.cmake" ;;
"SDL3.spec") CONFIG_FILES="$CONFIG_FILES SDL3.spec" ;;
"sdl3.pc") CONFIG_FILES="$CONFIG_FILES sdl3.pc" ;;
"sdl3_config") CONFIG_COMMANDS="$CONFIG_COMMANDS sdl3_config" ;;
"summary") CONFIG_COMMANDS="$CONFIG_COMMANDS summary" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
@ -32522,7 +32522,7 @@ compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
_LT_EOF
;;
"sdl2_config":C) chmod a+x sdl2-config ;;
"sdl3_config":C) chmod a+x sdl3-config ;;
"summary":C) printf "$SUMMARY" ;;
esac

View File

@ -11,18 +11,18 @@ orig_CFLAGS="$CFLAGS"
dnl Set various version strings - taken gratefully from the GTk sources
# See docs/release_checklist.md
SDL_MAJOR_VERSION=2
SDL_MINOR_VERSION=26
SDL_MAJOR_VERSION=3
SDL_MINOR_VERSION=0
SDL_MICRO_VERSION=0
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
AS_CASE(["$SDL_MINOR_VERSION"],
[*@<:@02468@:>@],
dnl Stable branch, 2.24.1 -> libSDL2-2.0.so.0.2400.1
dnl Stable branch, 3.24.1 -> libSDL3-3.0.so.0.2400.1
[SDL_INTERFACE_AGE="$SDL_MICRO_VERSION"],
[*],
dnl Development branch, 2.23.1 -> libSDL2-2.0.so.0.2301.0
dnl Development branch, 3.23.1 -> libSDL3-3.0.so.0.2301.0
[SDL_INTERFACE_AGE=0])
AC_SUBST(SDL_MAJOR_VERSION)
@ -37,9 +37,9 @@ LT_INIT([win32-dll])
LT_LANG([Windows Resource])
# For historical reasons, the library name redundantly includes the major
# version twice: libSDL2-2.0.so.0.
# version twice: libSDL3-3.0.so.0.
# TODO: in SDL 3, stop using -release, which will simplify it to libSDL3.so.0
LT_RELEASE=2.0
LT_RELEASE=3.0
# Increment this if there is an incompatible change - but if that happens,
# we should rename the library from SDL2 to SDL3, at which point this would
# reset to 0 anyway.
@ -162,7 +162,7 @@ EXTRA_LDFLAGS="$BASE_LDFLAGS"
# fi
#done
SDL_CFLAGS="$BASE_CFLAGS"
SDL_LIBS="-lSDL2"
SDL_LIBS="-lSDL3"
if test "x$BASE_LDFLAGS" != x; then
SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS"
fi
@ -4168,7 +4168,7 @@ case "$host" in
VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
SDL_LIBS="-lSDL2main $SDL_LIBS -mwindows"
SDL_LIBS="-lSDL3main $SDL_LIBS -mwindows"
# Check to see if this is a mingw or cygwin build
have_mingw32=
@ -4670,21 +4670,21 @@ esac
dnl Permit use of virtual joystick APIs on any platform (subject to configure options)
CheckVirtualJoystick
# Check whether to install sdl2-config
AC_MSG_CHECKING(whether to install sdl2-config)
AC_ARG_ENABLE([sdl2-config],
[AS_HELP_STRING([--enable-sdl2-config],[Install sdl2-config [default=yes]])],
# Check whether to install sdl3-config
AC_MSG_CHECKING(whether to install sdl3-config)
AC_ARG_ENABLE([sdl3-config],
[AS_HELP_STRING([--enable-sdl3-config],[Install sdl3-config [default=yes]])],
[case "${enableval}" in
yes) enable_sdl2_config="TRUE" ;;
no) enable_sdl2_config="FALSE" ;;
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-sdl2-config]) ;;
esac], [enable_sdl2_config="TRUE"])
if test "$enable_sdl2_config" = "TRUE"; then
yes) enable_sdl3_config="TRUE" ;;
no) enable_sdl3_config="FALSE" ;;
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-sdl3-config]) ;;
esac], [enable_sdl3_config="TRUE"])
if test "$enable_sdl3_config" = "TRUE"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AC_SUBST([INSTALL_SDL2_CONFIG], [$enable_sdl2_config])
AC_SUBST([INSTALL_SDL3_CONFIG], [$enable_sdl3_config])
AC_ARG_ENABLE([vendor-info],
[AS_HELP_STRING([--enable-vendor-info=STRING], [Add vendor info to SDL_REVISION])],
@ -4850,7 +4850,7 @@ SDL_STATIC_LIBS="$EXTRA_LDFLAGS"
dnl Calculate the location of the prefix, relative to the cmake folder
dnl Calculate the location of the prefix, relative to bindir
pkg_cmakedir='$libdir/cmake/SDL2'
pkg_cmakedir='$libdir/cmake/SDL3'
AX_COMPUTE_RELATIVE_PATHS([pkg_cmakedir:prefix:cmake_prefix_relpath bindir:prefix:bin_prefix_relpath])
AC_SUBST([cmake_prefix_relpath])
AC_SUBST([bin_prefix_relpath])
@ -4914,11 +4914,11 @@ $WAYLAND_PROTOCOLS_DEPENDS
__EOF__
AC_CONFIG_FILES([
Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake sdl2-config-version.cmake SDL2.spec sdl2.pc
Makefile:Makefile.in:Makefile.rules sdl3-config sdl3-config.cmake sdl3-config-version.cmake SDL3.spec sdl3.pc
])
AC_CONFIG_COMMANDS([sdl2_config],[chmod a+x sdl2-config])
AC_CONFIG_COMMANDS([sdl3_config],[chmod a+x sdl3-config])
SUMMARY="SDL2 Configure Summary:\n"
SUMMARY="SDL3 Configure Summary:\n"
if test x$enable_shared = xyes; then
SUMMARY="${SUMMARY}Building Shared Libraries\n"
fi

View File

@ -86,8 +86,8 @@ If you already have a project that uses CMake, the instructions change somewhat:
2. Edit "<project>/app/build.gradle" to comment out or remove sections containing ndk-build
and uncomment the cmake sections. Add arguments to the CMake invocation as needed.
3. Edit "<project>/app/jni/CMakeLists.txt" to include your project (it defaults to
adding the "src" subdirectory). Note that you'll have SDL2, SDL2main and SDL2-static
as targets in your project, so you should have "target_link_libraries(yourgame SDL2 SDL2main)"
adding the "src" subdirectory). Note that you'll have SDL3, SDL3main and SDL3-static
as targets in your project, so you should have "target_link_libraries(yourgame SDL3 SDL3main)"
in your CMakeLists.txt file. Also be aware that you should use add_library() instead of
add_executable() for the target containing your "main" function.
@ -414,10 +414,10 @@ Graphics debugging
================================================================================
If you are developing on a compatible Tegra-based tablet, NVidia provides
Tegra Graphics Debugger at their website. Because SDL2 dynamically loads EGL
Tegra Graphics Debugger at their website. Because SDL3 dynamically loads EGL
and GLES libraries, you must follow their instructions for installing the
interposer library on a rooted device. The non-rooted instructions are not
compatible with applications that use SDL2 for video.
compatible with applications that use SDL3 for video.
The Tegra Graphics Debugger is available from NVidia here:
https://developer.nvidia.com/tegra-graphics-debugger

View File

@ -57,24 +57,24 @@ option(MYGAME_VENDORED "Use vendored libraries" OFF)
if(MYGAME_VENDORED)
add_subdirectory(vendored/sdl EXCLUDE_FROM_ALL)
else()
# 1. Look for a SDL2 package, 2. look for the SDL2 component and 3. fail if none can be found
find_package(SDL2 REQUIRED CONFIG REQUIRED COMPONENTS SDL2)
# 1. Look for a SDL3 package, 2. look for the SDL3 component and 3. fail if none can be found
find_package(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3)
# 1. Look for a SDL2 package, 2. Look for the SDL2maincomponent and 3. DO NOT fail when SDL2main is not available
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
# 1. Look for a SDL3 package, 2. Look for the SDL3maincomponent and 3. DO NOT fail when SDL3main is not available
find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3main)
endif()
# Create your game executable target as usual
add_executable(mygame WIN32 mygame.c)
# SDL2::SDL2main may or may not be available. It is e.g. required by Windows GUI applications
if(TARGET SDL2::SDL2main)
# It has an implicit dependency on SDL2 functions, so it MUST be added before SDL2::SDL2 (or SDL2::SDL2-static)
target_link_libraries(mygame PRIVATE SDL2::SDL2main)
# SDL3::SDL3main may or may not be available. It is e.g. required by Windows GUI applications
if(TARGET SDL3::SDL3main)
# It has an implicit dependency on SDL3 functions, so it MUST be added before SDL3::SDL3 (or SDL3::SDL3-static)
target_link_libraries(mygame PRIVATE SDL3::SDL3main)
endif()
# Link to the actual SDL2 library. SDL2::SDL2 is the shared SDL library, SDL2::SDL2-static is the static SDL libarary.
target_link_libraries(mygame PRIVATE SDL2::SDL2)
# Link to the actual SDL3 library. SDL3::SDL3 is the shared SDL library, SDL3::SDL3-static is the static SDL libarary.
target_link_libraries(mygame PRIVATE SDL3::SDL3)
```
### A system SDL library
@ -85,10 +85,10 @@ The following components are available, to be used as an argument of `find_packa
| Component name | Description |
|----------------|--------------------------------------------------------------------------------------------|
| SDL2 | The SDL2 shared library, available through the `SDL2::SDL2` target [^SDL_TARGET_EXCEPTION] |
| SDL2-static | The SDL2 static library, available through the `SDL2::SDL2-static` target |
| SDL2main | The SDL2main static library, available through the `SDL2::SDL2main` target |
| SDL2test | The SDL2test static library, available through the `SDL2::SDL2test` target |
| SDL3 | The SDL3 shared library, available through the `SDL3::SDL3` target [^SDL_TARGET_EXCEPTION] |
| SDL3-static | The SDL3 static library, available through the `SDL3::SDL3-static` target |
| SDL3main | The SDL3main static library, available through the `SDL3::SDL3main` target |
| SDL3test | The SDL3test static library, available through the `SDL3::SDL3test` target |
### Using a vendored SDL
@ -160,4 +160,4 @@ To use, set the following CMake variables when running CMake's configuration sta
```
[^SDL_TARGET_EXCEPTION]: `SDL2::SDL2` can be an ALIAS to a static `SDL2::SDL2-static` target for multiple reasons.
[^SDL_TARGET_EXCEPTION]: `SDL3::SDL3` can be an ALIAS to a static `SDL3::SDL3-static` target for multiple reasons.

View File

@ -4,22 +4,22 @@ Originally posted on Ryan's Google+ account.
Background:
- The Steam Runtime has (at least in theory) a really kick-ass build of SDL2,
but developers are shipping their own SDL2 with individual Steam games.
These games might stop getting updates, but a newer SDL2 might be needed later.
- The Steam Runtime has (at least in theory) a really kick-ass build of SDL,
but developers are shipping their own SDL with individual Steam games.
These games might stop getting updates, but a newer SDL might be needed later.
Certainly we'll always be fixing bugs in SDL, even if a new video target isn't
ever needed, and these fixes won't make it to a game shipping its own SDL.
- Even if we replace the SDL2 in those games with a compatible one, that is to
- Even if we replace the SDL in those games with a compatible one, that is to
say, edit a developer's Steam depot (yuck!), there are developers that are
statically linking SDL2 that we can't do this for. We can't even force the
dynamic loader to ignore their SDL2 in this case, of course.
- If you don't ship an SDL2 with the game in some form, people that disabled the
statically linking SDL that we can't do this for. We can't even force the
dynamic loader to ignore their SDL in this case, of course.
- If you don't ship an SDL with the game in some form, people that disabled the
Steam Runtime, or just tried to run the game from the command line instead of
Steam might find themselves unable to run the game, due to a missing dependency.
- If you want to ship on non-Steam platforms like GOG or Humble Bundle, or target
generic Linux boxes that may or may not have SDL2 installed, you have to ship
generic Linux boxes that may or may not have SDL installed, you have to ship
the library or risk a total failure to launch. So now, you might have to have
a non-Steam build plus a Steam build (that is, one with and one without SDL2
a non-Steam build plus a Steam build (that is, one with and one without SDL
included), which is inconvenient if you could have had one universal build
that works everywhere.
- We like the zlib license, but the biggest complaint from the open source
@ -65,8 +65,8 @@ system's dynamic loader was supposed to do for us? Yes, but now we've got this
level of indirection, we can do things like this:
```bash
export SDL_DYNAMIC_API=/my/actual/libSDL-2.0.so.0
./MyGameThatIsStaticallyLinkedToSDL2
export SDL_DYNAMIC_API=/my/actual/libSDL3.so.0
./MyGameThatIsStaticallyLinkedToSDL
```
And now, this game that is statically linked to SDL, can still be overridden
@ -108,7 +108,7 @@ the jump table, and the size, in bytes, of the table.
Now, we've got policy here: this table's layout never changes; new stuff gets
added to the end. Therefore SDL_DYNAPI_entry() knows that it can provide all
the needed functions if tablesize <= sizeof its own jump table. If tablesize is
bigger (say, SDL 2.0.4 is trying to load SDL 2.0.3), then we know to abort, but
bigger (say, SDL 3.0.4 is trying to load SDL 3.0.3), then we know to abort, but
if it's smaller, we know we can provide the entire API that the caller needs.
The version variable is a failsafe switch.

View File

@ -59,11 +59,11 @@ Or with cmake:
To build one of the tests:
$ cd test/
$ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html
$ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL3.a ../build/libSDL3_test.a -o a.html
Uses GLES2 renderer or software
Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere):
Some other SDL3 libraries can be easily built (assuming SDL3 is installed somewhere):
SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/):

View File

@ -25,7 +25,7 @@ The Windows GDK port supports the full set of Win32 APIs, renderers, controllers
* Initializing/uninitializing the game runtime, and initializing Xbox Live services
* Creating a global task queue and setting it as the default for the process. When running any async operations, passing in `NULL` as the task queue will make the task get added to the global task queue.
* An implementation on `WinMain` that performs the above GDK setup (you should link against SDL2main.lib, as in Windows x64). If you are unable to do this, you can instead manually call `SDL_GDKRunApp` from your entry point, passing in your `SDL_main` function and `NULL` as the parameters.
* An implementation on `WinMain` that performs the above GDK setup (you should link against SDL3main.lib, as in Windows x64). If you are unable to do this, you can instead manually call `SDL_GDKRunApp` from your entry point, passing in your `SDL_main` function and `NULL` as the parameters.
* Global task queue callbacks are dispatched during `SDL_PumpEvents` (which is also called internally if using `SDL_PollEvent`).
* You can get the handle of the global task queue through `SDL_GDKGetTaskQueue`, if needed. When done with the queue, be sure to use `XTaskQueueCloseHandle` to decrement the reference count (otherwise it will cause a resource leak).
@ -36,8 +36,8 @@ The Windows GDK port supports the full set of Win32 APIs, renderers, controllers
The included `VisualC-GDK/SDL.sln` solution includes the following targets for the Gaming.Desktop.x64 configuration:
* SDL2 (DLL) - This is the typical SDL2.dll, but for Gaming.Desktop.x64.
* SDL2main (lib) - This contains a drop-in implementation of `WinMain` that is used as the entry point for GDK programs.
* SDL3 (DLL) - This is the typical SDL3.dll, but for Gaming.Desktop.x64.
* SDL3main (lib) - This contains a drop-in implementation of `WinMain` that is used as the entry point for GDK programs.
* tests/testgamecontroller - Standard SDL test program demonstrating controller functionality.
* tests/testgdk - GDK-specific test program that demonstrates using the global task queue to login a user into Xbox Live.
*NOTE*: As of the June 2022 GDK, you cannot test user logins without a valid Title ID and MSAAppId. You will need to manually change the identifiers in the `MicrosoftGame.config` to your valid IDs from Partner Center if you wish to test this.
@ -54,21 +54,21 @@ These steps assume you already have a game using SDL that runs on Windows x64 al
In your game's existing Visual Studio Solution, go to Build > Configuration Manager. From the "Active solution platform" drop-down select "New...". From the drop-down list, select Gaming.Desktop.x64 and copy the settings from the x64 configuration.
### 2. Build SDL2 and SDL2main for GDK ###
### 2. Build SDL3 and SDL3main for GDK ###
Open `VisualC-GDK/SDL.sln` in Visual Studio, you need to build the SDL2 and SDL2main targets for the Gaming.Desktop.x64 platform (Release is recommended). You will need to copy/keep track of the `SDL2.dll`, `XCurl.dll` (which is output by Gaming.Desktop.x64), `SDL2.lib`, and `SDL2main.lib` output files for your game project.
Open `VisualC-GDK/SDL.sln` in Visual Studio, you need to build the SDL3 and SDL3main targets for the Gaming.Desktop.x64 platform (Release is recommended). You will need to copy/keep track of the `SDL3.dll`, `XCurl.dll` (which is output by Gaming.Desktop.x64), `SDL3.lib`, and `SDL3main.lib` output files for your game project.
*Alternatively*, you could setup your solution file to instead reference the SDL2/SDL2main project file targets from the SDL source, and add those projects as a dependency. This would mean that SDL2 and SDL2main would both be built when your game is built.
*Alternatively*, you could setup your solution file to instead reference the SDL3/SDL3main project file targets from the SDL source, and add those projects as a dependency. This would mean that SDL3 and SDL3main would both be built when your game is built.
### 3. Configuring Project Settings ###
While the Gaming.Desktop.x64 configuration sets most of the required settings, there are some additional items to configure for your game project under the Gaming.Desktop.x64 Configuration:
* Under C/C++ > General > Additional Include Directories, make sure the `SDL/include` path is referenced
* Under Linker > General > Additional Library Directories, make sure to reference the path where the newly-built SDL2.lib and SDL2main.lib are
* Under Linker > General > Additional Library Directories, make sure to reference the path where the newly-built SDL3.lib and SDL3main.lib are
* Under Linker > Input > Additional Dependencies, you need the following:
* `SDL2.lib`
* `SDL2main.lib` (unless not using)
* `SDL3.lib`
* `SDL3main.lib` (unless not using)
* `xgameruntime.lib`
* `../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib`
* Note that in general, the GDK libraries depend on the MSVC C/C++ runtime, so there is no way to remove this dependency from a GDK program that links against GDK.
@ -81,7 +81,7 @@ Rather than using your own implementation of `WinMain`, it's recommended that yo
The game will not launch in the debugger unless required DLLs are included in the directory that contains the game's .exe file. You need to make sure that the following files are copied into the directory:
* Your SDL2.dll
* Your SDL3.dll
* "$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll"
* XCurl.dll

View File

@ -20,7 +20,7 @@ Using the Simple DirectMedia Layer for iOS
3. Right click the project in the main view, select "Add Files...", and add the SDL project, Xcode/SDL/SDL.xcodeproj
4. Select the project in the main view, go to the "Info" tab and under "Custom iOS Target Properties" remove the line "Main storyboard file base name"
5. Select the project in the main view, go to the "Build Settings" tab, select "All", and edit "Header Search Path" and drag over the SDL "Public Headers" folder from the left
6. Select the project in the main view, go to the "Build Phases" tab, select "Link Binary With Libraries", and add SDL2.framework from "Framework-iOS"
6. Select the project in the main view, go to the "Build Phases" tab, select "Link Binary With Libraries", and add SDL3.framework from "Framework-iOS"
7. Select the project in the main view, go to the "General" tab, scroll down to "Frameworks, Libraries, and Embedded Content", and select "Embed & Sign" for the SDL library.
8. In the main view, expand SDL -> Library Source -> main -> uikit and drag SDL_uikit_main.c into your game files
9. Add the source files that you would normally have for an SDL program, making sure to have #include "SDL.h" at the top of the file containing your main() function.
@ -194,15 +194,15 @@ http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOS
Notes -- xcFramework
==============================================================================
The SDL.xcodeproj file now includes a target to build SDL2.xcframework. An xcframework is a new (Xcode 11) uber-framework which can handle any combination of processor type and target OS platform.
The SDL.xcodeproj file now includes a target to build SDL3.xcframework. An xcframework is a new (Xcode 11) uber-framework which can handle any combination of processor type and target OS platform.
In the past, iOS devices were always an ARM variant processor, and the simulator was always i386 or x86_64, and thus libraries could be combined into a single framework for both simulator and device. With the introduction of the Apple Silicon ARM-based machines, regular frameworks would collide as CPU type was no longer sufficient to differentiate the platform. So Apple created the new xcframework library package.
The xcframework target builds into a Products directory alongside the SDL.xcodeproj file, as SDL2.xcframework. This can be brought in to any iOS project and will function properly for both simulator and device, no matter their CPUs. Note that Intel Macs cannot cross-compile for Apple Silicon Macs. If you need AS compatibility, perform this build on an Apple Silicon Mac.
The xcframework target builds into a Products directory alongside the SDL.xcodeproj file, as SDL3.xcframework. This can be brought in to any iOS project and will function properly for both simulator and device, no matter their CPUs. Note that Intel Macs cannot cross-compile for Apple Silicon Macs. If you need AS compatibility, perform this build on an Apple Silicon Mac.
This target requires Xcode 11 or later. The target will simply fail to build if attempted on older Xcodes.
In addition, on Apple platforms, main() cannot be in a dynamically loaded library. This means that iOS apps which used the statically-linked libSDL2.lib and now link with the xcframwork will need to define their own main() to call SDL_UIKitRunApp(), like this:
In addition, on Apple platforms, main() cannot be in a dynamically loaded library. This means that iOS apps which used the statically-linked libSDL3.lib and now link with the xcframwork will need to define their own main() to call SDL_UIKitRunApp(), like this:
#ifndef SDL_MAIN_HANDLED
#ifdef main

View File

@ -8,7 +8,7 @@ WSCONS support has been brought back, but only as an input backend. It will not
OpenBSD note: Note that the video backend assumes that the user has read/write permissions to the /dev/drm* devices.
SDL2 WSCONS input backend features
SDL WSCONS input backend features
===================================================
1. It is keymap-aware; it will work properly with different keymaps.
2. It has mouse support.

View File

@ -22,6 +22,6 @@ cmake --install build
## Notes
- Currently only software rendering is supported.
- SDL2main should be used to ensure ROMFS is enabled.
- SDL3main should be used to ensure ROMFS is enabled.
- By default, the extra L2 cache and higher clock speeds of the New 2/3DS lineup are enabled. If you wish to turn it off, use `osSetSpeedupEnable(false)` in your main function.
- `SDL_GetBasePath` returns the romfs root instead of the executable's directory.

View File

@ -1,7 +1,7 @@
Nokia N-Gage
============
SDL2 port for Symbian S60v1 and v2 with a main focus on the Nokia N-Gage
SDL port for Symbian S60v1 and v2 with a main focus on the Nokia N-Gage
(Classic and QD) by [Michael Fitzmayer](https://github.com/mupfdev).
Compiling
@ -12,7 +12,7 @@ The library is included in the
[toolchain](https://github.com/ngagesdk/ngage-toolchain) as a
sub-module.
A complete example project based on SDL2 can be found in the GitHub
A complete example project based on SDL can be found in the GitHub
account of the SDK: [Wordle](https://github.com/ngagesdk/wordle).
Current level of implementation

View File

@ -42,24 +42,21 @@ Installing:
- eComStation:
If you have previously installed SDL2, make a Backup copy of SDL2.dll
If you have previously installed SDL3, make a Backup copy of SDL3.dll
located in D:\ecs\dll (where D: is disk on which installed eComStation).
Stop all programs running with SDL2. Copy SDL2.dll to D:\ecs\dll
Stop all programs running with SDL3. Copy SDL3.dll to D:\ecs\dll
- OS/2:
Copy SDL2.dll to any directory on your LIBPATH. If you have a previous
version installed, close all SDL2 applications before replacing the old
Copy SDL3.dll to any directory on your LIBPATH. If you have a previous
version installed, close all SDL3 applications before replacing the old
copy. Also make sure that any other older versions of DLLs are removed
from your system.
Joysticks in SDL2:
Joysticks:
------------------
The joystick code in SDL2 is a direct forward-port from the SDL-1.2 version.
Here is the original documentation from SDL-1.2:
The Joystick detection only works for standard joysticks (2 buttons, 2 axes
and the like). Therefore, if you use a non-standard joystick, you should
specify its features in the SDL_OS2_JOYSTICK environment variable in a batch

View File

@ -1,6 +1,6 @@
PS2
======
SDL2 port for the Sony Playstation 2 contributed by:
SDL port for the Sony Playstation 2 contributed by:
- Francisco Javier Trujillo Mata
@ -9,7 +9,7 @@ Credit to
- David G. F. for helping me with several issues and tests.
## Building
To build SDL2 library for the PS2, make sure you have the latest PS2Dev status and run:
To build SDL library for the PS2, make sure you have the latest PS2Dev status and run:
```bash
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake
cmake --build build
@ -48,4 +48,4 @@ Remember to do a clean compilation everytime you enable or disable the `SDL_PS2_
## To Do
- PS2 Screen Keyboard
- Dialogs
- Others
- Others

View File

@ -1,6 +1,6 @@
PSP
======
SDL2 port for the Sony PSP contributed by:
SDL port for the Sony PSP contributed by:
- Captian Lex
- Francisco Javier Trujillo Mata
- Wouter Wijsman
@ -11,7 +11,7 @@ Credit to
Geecko for his PSP GU lib "Glib2d"
## Building
To build SDL2 library for the PSP, make sure you have the latest PSPDev status and run:
To build SDL library for the PSP, make sure you have the latest PSPDev status and run:
```bash
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake
cmake --build build
@ -33,4 +33,4 @@ cmake --install build
## To Do
- PSP Screen Keyboard
- Dialogs
- Dialogs

View File

@ -81,13 +81,13 @@ The final step is compiling SDL itself.
export CC="/opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux"
cd <SDL SOURCE>
mkdir -p build;cd build
LDFLAGS="-L$SYSROOT/opt/vc/lib" ../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd
LDFLAGS="-L$SYSROOT/opt/vc/lib" ../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl3-installed --disable-pulseaudio --disable-esd
make
make install
To be able to deploy this to /usr/local in the Raspbian system you need to fix up a few paths:
perl -w -pi -e "s#$PWD/rpi-sdl2-installed#/usr/local#g;" ./rpi-sdl2-installed/lib/libSDL2.la ./rpi-sdl2-installed/lib/pkgconfig/sdl2.pc ./rpi-sdl2-installed/bin/sdl2-config
perl -w -pi -e "s#$PWD/rpi-sdl3-installed#/usr/local#g;" ./rpi-sdl3-installed/lib/libSDL3.la ./rpi-sdl3-installed/lib/pkgconfig/sdl3.pc ./rpi-sdl3-installed/bin/sdl3-config
Apps don't work or poor video/audio performance
-----------------------------------------------

View File

@ -12,15 +12,15 @@ Requirements:
Compiling:
----------
Currently, SDL2 for RISC OS only supports compiling with GCCSDK under Linux. Both the autoconf and CMake build systems are supported.
Currently, SDL for RISC OS only supports compiling with GCCSDK under Linux. Both the autoconf and CMake build systems are supported.
The following commands can be used to build SDL2 for RISC OS using autoconf:
The following commands can be used to build SDL for RISC OS using autoconf:
./configure --host=arm-unknown-riscos --prefix=$GCCSDK_INSTALL_ENV --disable-gcc-atomics
make
make install
The following commands can be used to build SDL2 for RISC OS using CMake:
The following commands can be used to build SDL for RISC OS using CMake:
cmake -Bbuild-riscos -DCMAKE_TOOLCHAIN_FILE=$GCCSDK_INSTALL_ENV/toolchain-riscos.cmake -DRISCOS=ON -DCMAKE_INSTALL_PREFIX=$GCCSDK_INSTALL_ENV -DCMAKE_BUILD_TYPE=Release -DSDL_GCC_ATOMICS=OFF
cmake --build build-riscos

View File

@ -27,9 +27,9 @@ You may get a few warnings, but you should not get any errors.
Later, we will refer to the following `.lib` and `.dll` files that have just been generated:
- `./VisualC/Win32/Debug/SDL2.dll` or `./VisualC/Win32/Release/SDL2.dll`
- `./VisualC/Win32/Debug/SDL2.lib` or `./VisualC/Win32/Release/SDL2.lib`
- `./VisualC/Win32/Debug/SDL2main.lib` or `./VisualC/Win32/Release/SDL2main.lib`
- `./VisualC/Win32/Debug/SDL3.dll` or `./VisualC/Win32/Release/SDL3.dll`
- `./VisualC/Win32/Debug/SDL3.lib` or `./VisualC/Win32/Release/SDL3.lib`
- `./VisualC/Win32/Debug/SDL3main.lib` or `./VisualC/Win32/Release/SDL3main.lib`
_Note for the `x64` versions, just replace `Win32` in the path with `x64`_
@ -59,12 +59,12 @@ Now we're going to use the files that we had created earlier in the *Build SDL*
Copy the following file into your Project directory:
- `SDL2.dll`
- `SDL3.dll`
Add the following files to your project (It is not necessary to copy them to your project directory):
- `SDL2.lib`
- `SDL2main.lib`
- `SDL3.lib`
- `SDL3main.lib`
To add them to your project, right click on your project, and select
`Add files to project`.
@ -73,7 +73,7 @@ To add them to your project, right click on your project, and select
and type the names of the libraries to link with in the "Additional Options:" box. Note: This must be done for each build configuration
(e.g. Release,Debug).**
### Hello SDL2
### Hello SDL
Here's a sample SDL snippet to verify everything is setup in your IDE:
@ -88,7 +88,7 @@ Here's a sample SDL snippet to verify everything is setup in your IDE:
SDL_Renderer* renderer = NULL;
SDL_Init(SDL_INIT_VIDEO);
window = SDL_CreateWindow("SDL2 Test", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, WIDTH, HEIGHT, SDL_WINDOW_SHOWN);
window = SDL_CreateWindow("Hello SDL", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, WIDTH, HEIGHT, SDL_WINDOW_SHOWN);
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
SDL_DestroyRenderer(renderer);

View File

@ -272,8 +272,8 @@ To include these files for C/C++ projects:
2. navigate to the directory containing SDL's source code, then into its
subdirectory, 'src/main/winrt/'. Select, then add, the following files:
- `SDL_winrt_main_NonXAML.cpp`
- `SDL2-WinRTResources.rc`
- `SDL2-WinRTResource_BlankCursor.cur`
- `SDL3-WinRTResources.rc`
- `SDL3-WinRTResource_BlankCursor.cur`
3. right-click on the file `SDL_winrt_main_NonXAML.cpp` (as listed in your
project), then click on "Properties...".
4. in the drop-down box next to "Configuration", choose, "All Configurations"
@ -287,7 +287,7 @@ app's project. This is to make sure that Visual C++'s linker builds a 'Windows
Metadata' file (.winmd) for your app. Not doing so can lead to build errors.**
For non-C++ projects, you will need to call SDL_WinRTRunApp from your language's
main function, and generate SDL2-WinRTResources.res manually by using `rc` via
main function, and generate SDL3-WinRTResources.res manually by using `rc` via
the Developer Command Prompt and including it as a <Win32Resource> within the
first <PropertyGroup> block in your Visual Studio project file.

View File

@ -31,7 +31,7 @@ PROJECT_NAME = SDL
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 2.0
PROJECT_NUMBER = 3.0
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
@ -868,14 +868,14 @@ GENERATE_DOCSET = NO
# documentation sets from a single provider (such as a company or product suite)
# can be grouped.
DOCSET_FEEDNAME = "SDL 2.0 Doxygen"
DOCSET_FEEDNAME = "SDL 3.0 Doxygen"
# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
# should uniquely identify the documentation set bundle. This should be a
# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
# will append .docset to the name.
DOCSET_BUNDLE_ID = org.libsdl.sdl20
DOCSET_BUNDLE_ID = org.libsdl.sdl30
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
# will be generated that can be used as input for tools like the
@ -889,7 +889,7 @@ GENERATE_HTMLHELP = NO
# can add a path in front of the file if the result should not be
# written to the html output directory.
CHM_FILE = ./sdl20.chm
CHM_FILE = ./sdl30.chm
# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
# be used to specify the location (absolute path including file name) of

View File

@ -146,7 +146,7 @@ extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
/**
* Compatibility function to initialize the SDL library.
*
* In SDL2, this function and SDL_Init() are interchangeable.
* This function and SDL_Init() are interchangeable.
*
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
* \returns 0 on success or a negative error code on failure; call

View File

@ -1211,7 +1211,7 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
* You should not call SDL_LockAudio() on the device before queueing; SDL
* handles locking internally for this function.
*
* Note that SDL2 does not support planar audio. You will need to resample
* Note that SDL does not support planar audio. You will need to resample
* from planar audio formats into a non-planar one (see SDL_AudioFormat)
* before queuing audio.
*

View File

@ -352,7 +352,7 @@ extern "C" {
* \brief Disable giving back control to the browser automatically
* when running with asyncify
*
* With -s ASYNCIFY, SDL2 calls emscripten_sleep during operations
* With -s ASYNCIFY, SDL calls emscripten_sleep during operations
* such as refreshing the screen or polling events.
*
* This hint only applies to the emscripten platform

View File

@ -55,7 +55,7 @@
/* On GDK, SDL provides a main function that initializes the game runtime.
Please note that #include'ing SDL_main.h is not enough to get a main()
function working. You must either link against SDL2main or, if not possible,
function working. You must either link against SDL3main or, if not possible,
call the SDL_GDKRunApp function from your entry point.
*/
#define SDL_MAIN_NEEDED

View File

@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
#ifndef SDL_test_h_

View File

@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/* Ported from original test\common.h file. */

View File

@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
#ifndef SDL_test_font_h_

View File

@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
#ifndef SDL_test_memory_h_

View File

@ -24,7 +24,7 @@
*
* Include file for SDL test framework.
*
* This code is a part of the SDL2_test library, not the main SDL library.
* This code is a part of the SDL test library, not the main SDL library.
*/
/*

View File

@ -94,15 +94,15 @@ typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
*
* We compile SDL into a DLL. This means, that it's the DLL which
* creates a new thread for the calling process with the SDL_CreateThread()
* API. There is a problem with this, that only the RTL of the SDL2.DLL will
* API. There is a problem with this, that only the RTL of the SDL3.DLL will
* be initialized for those threads, and not the RTL of the calling
* application!
*
* To solve this, we make a little hack here.
*
* We'll always use the caller's _beginthread() and _endthread() APIs to
* start a new thread. This way, if it's the SDL2.DLL which uses this API,
* then the RTL of SDL2.DLL will be used to create the new thread, and if it's
* start a new thread. This way, if it's the SDL3.DLL which uses this API,
* then the RTL of SDL3.DLL will be used to create the new thread, and if it's
* the application, then the RTL of the application will be used.
*
* So, in short:
@ -147,7 +147,7 @@ SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn,
#elif defined(__OS2__)
/*
* just like the windows case above: We compile SDL2
* just like the windows case above: We compile SDL3
* into a dll with Watcom's runtime statically linked.
*/
#define SDL_PASSED_BEGINTHREAD_ENDTHREAD

View File

@ -57,8 +57,8 @@ typedef struct SDL_version
/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
*/
#define SDL_MAJOR_VERSION 2
#define SDL_MINOR_VERSION 26
#define SDL_MAJOR_VERSION 3
#define SDL_MINOR_VERSION 0
#define SDL_PATCHLEVEL 0
/**
@ -84,7 +84,7 @@ typedef struct SDL_version
}
/* TODO: Remove this whole block in SDL 3 */
#if SDL_MAJOR_VERSION < 3
#if SDL_MAJOR_VERSION <= 3
/**
* This macro turns the version numbers into a numeric value:
* \verbatim

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