Skip to content

Commit 33531ee

Browse files
committed
cmake: fix macho {compatibility,current} version
1 parent 9be9136 commit 33531ee

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

CMakeLists.txt

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,18 +118,14 @@ set_target_properties(SDL2_net PROPERTIES
118118
if(NOT ANDROID)
119119
set_target_properties(SDL2_net PROPERTIES
120120
DEBUG_POSTFIX "${SDL2NET_DEBUG_POSTFIX}"
121+
SOVERSION "${LT_MAJOR}"
122+
VERSION "${LT_VERSION}"
121123
)
122124
if(APPLE)
123-
# the SOVERSION property corresponds to the compatibility version and VERSION corresponds to the current version
124-
# https://cmake.org/cmake/help/latest/prop_tgt/SOVERSION.html#mach-o-versions
125+
cmake_minimum_required(VERSION 3.17)
125126
set_target_properties(SDL2_net PROPERTIES
126-
SOVERSION "${DYLIB_COMPATIBILITY_VERSION}"
127-
VERSION "${DYLIB_CURRENT_VERSION}"
128-
)
129-
else()
130-
set_target_properties(SDL2_net PROPERTIES
131-
SOVERSION "${LT_MAJOR}"
132-
VERSION "${LT_VERSION}"
127+
MACHO_COMPATIBILITY_VERSION "${DYLIB_COMPATIBILITY_VERSION}"
128+
MACHO_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}"
133129
)
134130
endif()
135131
endif()

0 commit comments

Comments
 (0)