build sdl2 with metal and vulkan support

This commit is contained in:
alexey.lysiuk 2021-09-12 11:06:42 +03:00
parent 33fd8218ed
commit 4c5a8b5221
8 changed files with 10 additions and 10 deletions

View file

@ -45,7 +45,7 @@ while test $# -gt 0; do
echo -I${prefix}/include/SDL2 -D_THREAD_SAFE
;;
--libs|--static-libs)
echo -L${libdir} -lSDL2 -framework AudioToolbox -framework AVFoundation -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreVideo -framework ForceFeedback -framework Foundation -framework IOKit
echo -L${libdir} -lSDL2 -framework AudioToolbox -framework AVFoundation -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreVideo -framework ForceFeedback -framework Foundation -framework IOKit -weak_framework Metal -weak_framework QuartzCore
;;
*)
echo "${usage}" 1>&2

View file

@ -1,2 +1,2 @@
#define SDL_REVISION "https://github.com/alexey-lysiuk/zdoom-macos-deps.git@3de060b6baa1f4c058c3050995b3001959c324f5"
#define SDL_REVISION "https://github.com/libsdl-org/SDL.git@25f9ed87ff6947d9576fc9d79dee0784e638ac58"
#define SDL_REVISION_NUMBER 0

View file

@ -419,7 +419,7 @@
/* #undef SDL_VIDEO_RENDER_OGL_ES */
#define SDL_VIDEO_RENDER_OGL_ES2 1
/* #undef SDL_VIDEO_RENDER_DIRECTFB */
/* #undef SDL_VIDEO_RENDER_METAL */
#define SDL_VIDEO_RENDER_METAL 1
/* #undef SDL_VIDEO_RENDER_VITA_GXM */
/* Enable OpenGL support */
@ -435,10 +435,10 @@
/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
/* Enable Vulkan support */
/* #undef SDL_VIDEO_VULKAN */
#define SDL_VIDEO_VULKAN 1
/* Enable Metal support */
/* #undef SDL_VIDEO_METAL */
#define SDL_VIDEO_METAL 1
/* Enable system power support */
/* #undef SDL_POWER_ANDROID */

View file

@ -419,7 +419,7 @@
/* #undef SDL_VIDEO_RENDER_OGL_ES */
#define SDL_VIDEO_RENDER_OGL_ES2 1
/* #undef SDL_VIDEO_RENDER_DIRECTFB */
/* #undef SDL_VIDEO_RENDER_METAL */
#define SDL_VIDEO_RENDER_METAL 1
/* #undef SDL_VIDEO_RENDER_VITA_GXM */
/* Enable OpenGL support */
@ -435,10 +435,10 @@
/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
/* Enable Vulkan support */
/* #undef SDL_VIDEO_VULKAN */
#define SDL_VIDEO_VULKAN 1
/* Enable Metal support */
/* #undef SDL_VIDEO_METAL */
#define SDL_VIDEO_METAL 1
/* Enable system power support */
/* #undef SDL_POWER_ANDROID */

View file

@ -55,7 +55,7 @@ add_library(SDL2::SDL2 STATIC IMPORTED)
set_target_properties(SDL2::SDL2 PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/include/SDL2"
INTERFACE_LINK_LIBRARIES "-framework AudioToolbox -framework AVFoundation -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreVideo -framework ForceFeedback -framework Foundation -framework IOKit"
INTERFACE_LINK_LIBRARIES "-framework AudioToolbox -framework AVFoundation -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreVideo -framework ForceFeedback -framework Foundation -framework IOKit -weak_framework Metal -weak_framework QuartzCore"
)
# Create imported target SDL2::SDL2main

Binary file not shown.

Binary file not shown.

View file

@ -10,5 +10,5 @@ Description: Simple DirectMedia Layer is a cross-platform multimedia library des
Version: 2.0.16
Requires:
Conflicts:
Libs: -L${libdir} -lSDL2 -framework AudioToolbox -framework AVFoundation -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreVideo -framework ForceFeedback -framework Foundation -framework IOKit
Libs: -L${libdir} -lSDL2 -framework AudioToolbox -framework AVFoundation -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreVideo -framework ForceFeedback -framework Foundation -framework IOKit -weak_framework Metal -weak_framework QuartzCore
Cflags: -I${includedir}/SDL2 -D_THREAD_SAFE