From 0941ae0b617839a724a62c0a69914686e81f053f Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Mon, 28 Nov 2022 23:20:04 -0500 Subject: CMake: Directly link to SDL2-static when appropriate Trying to be lazy and alias SDL2 to SDL2-static causes issues in later versions of CMake. Just use the same condition to tell which one to use. --- src/yuzu/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/yuzu/CMakeLists.txt') diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 0aa109dd3..060de0259 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -387,7 +387,11 @@ if (YUZU_USE_BUNDLED_QT AND QT_VERSION VERSION_LESS 6) endif() if (ENABLE_SDL2) - target_link_libraries(yuzu PRIVATE SDL2) + if (YUZU_USE_EXTERNAL_SDL2) + target_link_libraries(yuzu PRIVATE SDL2-static) + else() + target_link_libraries(yuzu PRIVATE SDL2) + endif() target_compile_definitions(yuzu PRIVATE HAVE_SDL2) endif() -- cgit v1.2.3