diff --git a/CMakeLists.txt b/CMakeLists.txt index 646ac63..b14daec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,19 +130,17 @@ set_target_properties(${sdl3_net_target_name} PROPERTIES sdl_target_link_option_version_file(${sdl3_net_target_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/SDL_net.sym") if(NOT ANDROID) + set_target_properties(${sdl3_net_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 + cmake_minimum_required(VERSION 3.17) set_target_properties(${sdl3_net_target_name} PROPERTIES - SOVERSION "${DYLIB_COMPAT_VERSION}" - VERSION "${DYLIB_CURRENT_VERSION}" + MACHO_COMPATIBILITY_VERSION "${DYLIB_COMPAT_VERSION}" + MACHO_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}" ) sdl_no_deprecated_errors(${sdl3_net_target_name}) - else() - set_target_properties(${sdl3_net_target_name} PROPERTIES - SOVERSION "${SO_VERSION_MAJOR}" - VERSION "${SO_VERSION}" - ) endif() endif() if(SDL3NET_BUILD_SHARED_LIBS)