Skip to content

Commit

Permalink
cmake: fix macho {compatibility,current} version
Browse files Browse the repository at this point in the history
  • Loading branch information
madebr committed May 1, 2024
1 parent 34ffd47 commit 5b8f81b
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,15 @@ set_target_properties(${sdl3_ttf_target_name} PROPERTIES
C_VISIBILITY_PRESET "hidden"
)
if(NOT ANDROID)
set_target_properties(${sdl3_ttf_target_name} PROPERTIES
SOVERSION "${SO_VERSION_MAJOR}"
VERSION "${SO_VERSION}"
)
if(APPLE)
# the SOVERSION property corresponds to the compatibility version and VERSION corresponds to the current version
# https://cmake.org/cmake/help/latest/prop_tgt/SOVERSION.html#mach-o-versions
set_target_properties(${sdl3_ttf_target_name} PROPERTIES
SOVERSION "${DYLIB_COMPAT_VERSION}"
VERSION "${DYLIB_CURRENT_VERSION}"
)
else()
cmake_minimum_required(VERSION 3.17)
set_target_properties(${sdl3_ttf_target_name} PROPERTIES
SOVERSION "${SO_VERSION_MAJOR}"
VERSION "${SO_VERSION}"
MACHO_COMPATIBILITY_VERSION "${DYLIB_COMPAT_VERSION}"
MACHO_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}"
)
endif()
endif()
Expand Down

0 comments on commit 5b8f81b

Please sign in to comment.