mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-11-23 18:19:40 +00:00
Fixed dylib generation on macOS
We just build libSDL3.dylib instead of libSDL3.0.0.0.dylib with symlinks Fixed the compatiblity vs current version, e.g. SDL 3.20.87 @rpath/libSDL3.0.dylib (compatibility version 2001.0.0, current version 2001.87.0) SDL 3.21.5 @rpath/libSDL3.dylib (compatibility version 2106.0.0, current version 2106.0.0)
This commit is contained in:
parent
6f20d990ad
commit
71d5f510c6
@ -98,18 +98,18 @@ set(SDL_SO_VERSION_MICRO "${SDL_MICRO_VERSION}")
|
||||
set(SDL_SO_VERSION "${SDL_SO_VERSION_MAJOR}.${SDL_SO_VERSION_MINOR}.${SDL_SO_VERSION_MICRO}")
|
||||
|
||||
if(SDL_MINOR_VERSION MATCHES "[02468]$")
|
||||
math(EXPR SDL_DYLIB_CURRENT_VERSION_MAJOR "100 * ${SDL_MINOR_VERSION} + 1")
|
||||
set(SDL_DYLIB_CURRENT_VERSION_MINOR "0")
|
||||
math(EXPR SDL_DYLIB_COMPAT_VERSION_MAJOR "${SDL_DYLIB_CURRENT_VERSION_MAJOR}")
|
||||
set(SDL_DYLIB_COMPAT_VERSION_MINOR "${SDL_MICRO_VERSION}")
|
||||
else()
|
||||
math(EXPR SDL_DYLIB_CURRENT_VERSION_MAJOR "100 * ${SDL_MINOR_VERSION} + ${SDL_MICRO_VERSION} + 1")
|
||||
set(SDL_DYLIB_CURRENT_VERSION_MINOR "0")
|
||||
math(EXPR SDL_DYLIB_COMPAT_VERSION_MAJOR "${SDL_DYLIB_CURRENT_VERSION_MAJOR}")
|
||||
math(EXPR SDL_DYLIB_COMPAT_VERSION_MAJOR "100 * ${SDL_MINOR_VERSION} + 1")
|
||||
set(SDL_DYLIB_COMPAT_VERSION_MINOR "0")
|
||||
math(EXPR SDL_DYLIB_CURRENT_VERSION_MAJOR "${SDL_DYLIB_COMPAT_VERSION_MAJOR}")
|
||||
set(SDL_DYLIB_CURRENT_VERSION_MINOR "${SDL_MICRO_VERSION}")
|
||||
else()
|
||||
math(EXPR SDL_DYLIB_COMPAT_VERSION_MAJOR "100 * ${SDL_MINOR_VERSION} + ${SDL_MICRO_VERSION} + 1")
|
||||
set(SDL_DYLIB_COMPAT_VERSION_MINOR "0")
|
||||
math(EXPR SDL_DYLIB_CURRENT_VERSION_MAJOR "${SDL_DYLIB_COMPAT_VERSION_MAJOR}")
|
||||
set(SDL_DYLIB_CURRENT_VERSION_MINOR "0")
|
||||
endif()
|
||||
set(SDL_DYLIB_CURRENT_VERSION_MICRO "0")
|
||||
set(SDL_DYLIB_COMPAT_VERSION_MICRO "0")
|
||||
set(SDL_DYLIB_CURRENT_VERSION_MICRO "0")
|
||||
|
||||
set(SDL_DYLIB_CURRENT_VERSION "${SDL_DYLIB_CURRENT_VERSION_MAJOR}.${SDL_DYLIB_CURRENT_VERSION_MINOR}.${SDL_DYLIB_CURRENT_VERSION_MICRO}")
|
||||
set(SDL_DYLIB_COMPAT_VERSION "${SDL_DYLIB_COMPAT_VERSION_MAJOR}.${SDL_DYLIB_COMPAT_VERSION_MINOR}.${SDL_DYLIB_COMPAT_VERSION_MICRO}")
|
||||
@ -3190,10 +3190,8 @@ if(SDL_SHARED)
|
||||
endif()
|
||||
endif()
|
||||
if(APPLE)
|
||||
# FIXME: Remove SOVERSION in SDL3
|
||||
set_target_properties(SDL3 PROPERTIES
|
||||
MACOSX_RPATH 1
|
||||
SOVERSION "0")
|
||||
MACOSX_RPATH 1)
|
||||
elseif(UNIX AND NOT ANDROID)
|
||||
set_target_properties(SDL3 PROPERTIES
|
||||
VERSION "${SDL_SO_VERSION}"
|
||||
|
Loading…
Reference in New Issue
Block a user