build: fix USE_SYSTEM_SDL

This commit is contained in:
Ștefan Talpalaru 2023-05-04 18:27:06 +02:00 committed by Ivan
parent 3cf8c629fa
commit 177bb3c569

View File

@ -345,6 +345,8 @@ if(USE_SDL)
message(STATUS "Using system SDL2")
add_library(3rdparty_sdl2 INTERFACE)
target_compile_definitions(3rdparty_sdl2 INTERFACE -DHAVE_SDL2=1)
target_include_directories(3rdparty_sdl2 INTERFACE ${SDL2_INCLUDE_DIRS})
target_link_libraries(3rdparty_sdl2 INTERFACE ${SDL2_LIBRARIES})
set(SDL2_TARGET 3rdparty_sdl2)
else()
message(FATAL_ERROR "SDL2 is not available on this system")