Skip to content

Commit

Permalink
Fix Cmake so generated SOname matches autoconf's #.
Browse files Browse the repository at this point in the history
  • Loading branch information
urkle committed Feb 10, 2014
1 parent 2d92a37 commit 7f4c6a9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Expand Up @@ -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")
Expand Down Expand Up @@ -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})
Expand Down

0 comments on commit 7f4c6a9

Please sign in to comment.