Merge pull request #210 from ritiek/patch-1

Assume ${SDL2_LIBRARIES} if not defined
This commit is contained in:
Eric Froemling 2020-11-17 09:32:50 -08:00 committed by GitHub
commit 261fca9e24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,10 @@ if (HEADLESS)
else ()
find_package(SDL2 QUIET)
if (SDL2_FOUND)
if ("${SDL2_LIBRARIES}" STREQUAL "")
message(WARNING "SDL2_LIBRARIES wasn't set, manually setting to SDL2::SDL2")
set(SDL2_LIBRARIES "SDL2::SDL2")
endif ()
# Getting complaint about space at the end of this on ubuntu16.
string(STRIP ${SDL2_LIBRARIES} SDL2_LIBRARIES)
else ()