Skip to content

Commit 2846ddc

Browse files
committed
cmake: fix macho {compatibility,current} version
1 parent be44a09 commit 2846ddc

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

CMakeLists.txt

+6-7
Original file line numberDiff line numberDiff line change
@@ -307,19 +307,18 @@ endif()
307307
sdl_target_link_option_version_file(${sdl3_image_target_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/SDL_image.sym")
308308

309309
if(NOT ANDROID)
310+
set_target_properties(${sdl3_image_target_name} PROPERTIES
311+
SOVERSION "${SO_VERSION_MAJOR}"
312+
VERSION "${SO_VERSION}"
313+
)
310314
if(APPLE)
311315
cmake_minimum_required(VERSION 3.17)
312316
set_target_properties(${sdl3_image_target_name} PROPERTIES
313-
SOVERSION "${SO_VERSION_MAJOR}"
314-
MACHO_COMPATIBILITY_VERSION "${DYLIB_COMPATIBILITY_VERSION}"
315-
MACHO_CURRENT_VERSION "${MACHO_CURRENT_VERSION}"
317+
MACHO_COMPATIBILITY_VERSION "${DYLIB_COMPAT_VERSION}"
318+
MACHO_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}"
316319
)
317320
sdl_no_deprecated_errors(${sdl3_image_target_name})
318321
else()
319-
set_target_properties(${sdl3_image_target_name} PROPERTIES
320-
SOVERSION "${SO_VERSION_MAJOR}"
321-
VERSION "${SO_VERSION}"
322-
)
323322
endif()
324323
endif()
325324
if(SDL3IMAGE_BUILD_SHARED_LIBS)

0 commit comments

Comments
 (0)