Skip to content
Permalink
Browse files

Fix Cmake so generated SOname matches autoconf's #.

  • Loading branch information
urkle committed Feb 10, 2014
1 parent 2d92a37 commit 7f4c6a9ca16b66d979a7406222493f08376285be
Showing with 6 additions and 3 deletions.
  1. +6 −3 CMakeLists.txt
@@ -37,9 +37,12 @@ set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}"
# Calculate a libtool-like version number
math(EXPR LT_CURRENT "${SDL_MICRO_VERSION} - ${SDL_INTERFACE_AGE}")
math(EXPR LT_AGE "${SDL_BINARY_AGE} - ${SDL_INTERFACE_AGE}")
math(EXPR LT_MAJOR "${LT_CURRENT}- ${LT_AGE}")
set(LT_REVISION "${SDL_INTERFACE_AGE}")
set(LT_RELEASE "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}")
set(LT_VERSION "${LT_CURRENT}.${LT_REVISION}.${LT_AGE}")
set(LT_VERSION "${LT_MAJOR}.${LT_AGE}.${LT_REVISION}")

message(STATUS "${LT_VERSION} :: ${LT_AGE} :: ${LT_REVISION} :: ${LT_CURRENT} :: ${LT_RELEASE}")

# General settings & flags
set(LIBRARY_OUTPUT_DIRECTORY "build")
@@ -1236,12 +1239,12 @@ if(SDL_SHARED)
if(UNIX)
set_target_properties(SDL2 PROPERTIES
VERSION ${LT_VERSION}
SOVERSION ${LT_CURRENT}
SOVERSION ${LT_REVISION}
OUTPUT_NAME "SDL2-${LT_RELEASE}")
else(UNIX)
set_target_properties(SDL2 PROPERTIES
VERSION ${SDL_VERSION}
SOVERSION ${LT_CURRENT}
SOVERSION ${LT_REVISION}
OUTPUT_NAME "SDL2")
endif()
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})

0 comments on commit 7f4c6a9

Please sign in to comment.