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 be44a09 commit 2846ddc
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -307,19 +307,18 @@ endif()
sdl_target_link_option_version_file(${sdl3_image_target_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/SDL_image.sym")

if(NOT ANDROID)
set_target_properties(${sdl3_image_target_name} PROPERTIES
SOVERSION "${SO_VERSION_MAJOR}"
VERSION "${SO_VERSION}"
)
if(APPLE)
cmake_minimum_required(VERSION 3.17)
set_target_properties(${sdl3_image_target_name} PROPERTIES
SOVERSION "${SO_VERSION_MAJOR}"
MACHO_COMPATIBILITY_VERSION "${DYLIB_COMPATIBILITY_VERSION}"
MACHO_CURRENT_VERSION "${MACHO_CURRENT_VERSION}"
MACHO_COMPATIBILITY_VERSION "${DYLIB_COMPAT_VERSION}"
MACHO_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}"
)
sdl_no_deprecated_errors(${sdl3_image_target_name})
else()
set_target_properties(${sdl3_image_target_name} PROPERTIES
SOVERSION "${SO_VERSION_MAJOR}"
VERSION "${SO_VERSION}"
)
endif()
endif()
if(SDL3IMAGE_BUILD_SHARED_LIBS)
Expand Down

0 comments on commit 2846ddc

Please sign in to comment.