mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-03 16:36:25 +00:00
build: Prefix SDL- to revision from REVISION.txt
This makes it possible to get the version number of an unknown SDL binary from `strings libSDL3.so.0 | grep SDL-`, like we could for SDL 2. Resolves: https://github.com/libsdl-org/SDL/issues/14114 Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:

committed by
Sam Lantinga

parent
d5b79418f4
commit
618b7b6c73
@@ -3638,7 +3638,8 @@ endforeach()
|
|||||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/REVISION.txt")
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/REVISION.txt")
|
||||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/REVISION.txt" revisions)
|
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/REVISION.txt" revisions)
|
||||||
list(GET revisions 0 revisions_0)
|
list(GET revisions 0 revisions_0)
|
||||||
string(STRIP "${revisions_0}" SDL_REVISION)
|
string(STRIP "${revisions_0}" revisions_0_stripped)
|
||||||
|
set(SDL_REVISION "SDL-${revisions_0_stripped}")
|
||||||
else()
|
else()
|
||||||
set(SDL_REVISION "" CACHE STRING "Custom SDL revision (only used when REVISION.txt does not exist)")
|
set(SDL_REVISION "" CACHE STRING "Custom SDL revision (only used when REVISION.txt does not exist)")
|
||||||
endif()
|
endif()
|
||||||
|
Reference in New Issue
Block a user