CMake: Fix SOVERSION/SONAME of non-release versions

When building SDL2 from git with CMake, you got libSDL2-2.0.so.1
instead of .0 (as it's the case when building with autotools).
This was caused by using LT_REVISION instead of LT_MAJOR for SOVERSION.

fixes #4310
This commit is contained in:
Daniel Gibson authored and Sam Lantinga committed 2021-07-08 14:55:33 -07:00
1 parent c20207d787
commit e2234ee97c
1 file changed
+1 -1
+1 -1
View File
@@ -2530,7 +2530,7 @@ if(SDL_SHARED)
elseif(UNIX AND NOT ANDROID)
set_target_properties(SDL2 PROPERTIES
VERSION ${LT_VERSION}
SOVERSION ${LT_REVISION}
SOVERSION ${LT_MAJOR}
OUTPUT_NAME "SDL2-${LT_RELEASE}")
else()
if(WINDOWS OR CYGWIN)