diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index e036580ca8..6edcd672ae 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -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")