From 9220811e0234626113f6394487f358da99be08c3 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 1 May 2024 22:08:03 +0200 Subject: [PATCH] cmake: fix macho {compatibility,current} version --- CMakeLists.txt | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) 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)