summaryrefslogtreecommitdiff
path: root/src/input_common
diff options
context:
space:
mode:
authorGravatar lat9nq2022-11-28 23:20:04 -0500
committerGravatar lat9nq2022-11-28 23:21:14 -0500
commit0941ae0b617839a724a62c0a69914686e81f053f (patch)
tree28c379025386165643e3d9677f29ff13ff4b6d47 /src/input_common
parentCMakeLists: Bump minimum required CMake version to 3.22 (diff)
downloadyuzu-0941ae0b617839a724a62c0a69914686e81f053f.tar.gz
yuzu-0941ae0b617839a724a62c0a69914686e81f053f.tar.xz
yuzu-0941ae0b617839a724a62c0a69914686e81f053f.zip
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.
Diffstat (limited to 'src/input_common')
-rw-r--r--src/input_common/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt
index cc6f0ffc0..193127d0a 100644
--- a/src/input_common/CMakeLists.txt
+++ b/src/input_common/CMakeLists.txt
@@ -55,7 +55,11 @@ if (ENABLE_SDL2)
55 drivers/sdl_driver.cpp 55 drivers/sdl_driver.cpp
56 drivers/sdl_driver.h 56 drivers/sdl_driver.h
57 ) 57 )
58 target_link_libraries(input_common PRIVATE SDL2) 58 if (YUZU_USE_EXTERNAL_SDL2)
59 target_link_libraries(input_common PRIVATE SDL2-static)
60 else()
61 target_link_libraries(input_common PRIVATE SDL2)
62 endif()
59 target_compile_definitions(input_common PRIVATE HAVE_SDL2) 63 target_compile_definitions(input_common PRIVATE HAVE_SDL2)
60endif() 64endif()
61 65