From 5b8f81bb64b76059c2775d8cf0d011be556f55c7 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 1 May 2024 22:06:34 +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 ba35b284..1119339a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()