cmake: Handle SDL2 static builds

This commit is contained in:
Ryan Pavlik 2020-11-20 10:09:55 -06:00 committed by Jakob Bornecrantz
parent 0cb64ce5bd
commit a6bedb9bb8

View file

@ -204,9 +204,12 @@ if(XRT_HAVE_OPENGLES AND NOT XRT_HAVE_EGL)
endif()
if(XRT_HAVE_SDL2)
# Arch work around
if(NOT DEFINED SDL2_LIBRARIES)
set(SDL2_LIBRARIES SDL2::SDL2)
if(TARGET SDL2::SDL2-static)
set(SDL2_LIBRARIES SDL2::SDL2-static)
elseif(TARGET SDL2::SDL2)
set(SDL2_LIBRARIES SDL2::SDL2)
endif()
endif()
endif()