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 9be9136 commit 33531ee
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,14 @@ set_target_properties(SDL2_net PROPERTIES
if(NOT ANDROID)
set_target_properties(SDL2_net PROPERTIES
DEBUG_POSTFIX "${SDL2NET_DEBUG_POSTFIX}"
SOVERSION "${LT_MAJOR}"
VERSION "${LT_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
cmake_minimum_required(VERSION 3.17)
set_target_properties(SDL2_net PROPERTIES
SOVERSION "${DYLIB_COMPATIBILITY_VERSION}"
VERSION "${DYLIB_CURRENT_VERSION}"
)
else()
set_target_properties(SDL2_net PROPERTIES
SOVERSION "${LT_MAJOR}"
VERSION "${LT_VERSION}"
MACHO_COMPATIBILITY_VERSION "${DYLIB_COMPATIBILITY_VERSION}"
MACHO_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}"
)
endif()
endif()
Expand Down

0 comments on commit 33531ee

Please sign in to comment.