From 54c95b9ddd70aa2835f6dba7cbd0b81ac468c2a2 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Mon, 21 Feb 2022 11:09:55 -0500 Subject: [PATCH] Link against SDL2::SDL2 if found --- platforms/sdl/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platforms/sdl/CMakeLists.txt b/platforms/sdl/CMakeLists.txt index 80be609..87fb92c 100644 --- a/platforms/sdl/CMakeLists.txt +++ b/platforms/sdl/CMakeLists.txt @@ -11,6 +11,10 @@ if(ENABLE_VULKAN) set(EXTRA_SRC ${CMAKE_CURRENT_SOURCE_DIR}/sdl_vulkan.cpp) endif() +if(TARGET SDL2::SDL2) + set(EXTRA_LIBRARIES SDL2::SDL2) +endif() + if(TARGET SDL2::Main) set(EXTRA_LIBRARIES SDL2::Main) endif() @@ -31,7 +35,6 @@ add_platform( LINK_LIBRARIES Core GFXVulkan - SDL2::SDL2 ${EXTRA_LIBRARIES} )