mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-28 03:26:15 +08:00
cmake: pass macho version information separately from so version
This commit is contained in:
committed by
GitHub
parent
a845c7027e
commit
aab7caebf0
+4
-4
@@ -3267,9 +3267,13 @@ if(SDL_SHARED)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
cmake_minimum_required(VERSION 3.17)
|
||||||
set_target_properties(SDL3-shared PROPERTIES
|
set_target_properties(SDL3-shared PROPERTIES
|
||||||
MACOSX_RPATH TRUE
|
MACOSX_RPATH TRUE
|
||||||
FRAMEWORK "${SDL_FRAMEWORK}"
|
FRAMEWORK "${SDL_FRAMEWORK}"
|
||||||
|
SOVERSION "${SDL_SO_VERSION_MAJOR}"
|
||||||
|
MACHO_COMPATIBILITY_VERSION "${SDL_DYLIB_COMPAT_VERSION}"
|
||||||
|
MACHO_CURRENT_VERSION "${SDL_DYLIB_CURRENT_VERSION}"
|
||||||
)
|
)
|
||||||
if(SDL_FRAMEWORK)
|
if(SDL_FRAMEWORK)
|
||||||
set_target_properties(SDL3-shared PROPERTIES
|
set_target_properties(SDL3-shared PROPERTIES
|
||||||
@@ -3279,10 +3283,6 @@ if(SDL_SHARED)
|
|||||||
RESOURCE "${SDL_FRAMEWORK_RESOURCES}"
|
RESOURCE "${SDL_FRAMEWORK_RESOURCES}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(SDL3-shared PROPERTIES
|
|
||||||
SOVERSION "${SDL_DYLIB_COMPAT_VERSION}" # SOVERSION corresponds to compatibility version
|
|
||||||
VERSION "${SDL_DYLIB_CURRENT_VERSION}" # VERSION corresponds to the current version
|
|
||||||
)
|
|
||||||
elseif(UNIX AND NOT ANDROID)
|
elseif(UNIX AND NOT ANDROID)
|
||||||
set_target_properties(SDL3-shared PROPERTIES
|
set_target_properties(SDL3-shared PROPERTIES
|
||||||
VERSION "${SDL_SO_VERSION}"
|
VERSION "${SDL_SO_VERSION}"
|
||||||
|
|||||||
Reference in New Issue
Block a user