diff --git a/CMakeLists.txt b/CMakeLists.txt index e81c8f9dd..69bc73f6c 100644 --- a/CMakeLists.txt +++ b/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})