aboutsummaryrefslogtreecommitdiff
path: root/src/input_common
diff options
context:
space:
mode:
authorcrueter <crueter@eden-emu.dev>2026-02-25 02:49:47 +0100
committercrueter <crueter@eden-emu.dev>2026-02-25 02:49:47 +0100
commitf25582833aa5d9cc8e540c217cf301eab9e607e7 (patch)
treef019aeab5254c7641717390208c3db6fa6c6413b /src/input_common
parent7758f708335994952ded51df425b76a81c225957 (diff)
[cmake] Start requiring SDL2 (#3632)
Closes #3466 Like said in the issue and the OpenSSL equivalent, disabling SDL2 on desktop is just not something we want to do. It's not worth the added burden of supporting the n+1'th matrix. Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3632 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'src/input_common')
-rw-r--r--src/input_common/CMakeLists.txt26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt
index 30ccd7e8c1..ef1308b1d0 100644
--- a/src/input_common/CMakeLists.txt
+++ b/src/input_common/CMakeLists.txt
@@ -1,4 +1,4 @@
-# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
@@ -49,7 +49,13 @@ else()
)
endif()
-if (ENABLE_SDL2)
+if (ANDROID)
+ target_sources(input_common PRIVATE
+ drivers/android.cpp
+ drivers/android.h)
+
+ target_link_libraries(input_common PRIVATE android)
+else()
target_sources(input_common PRIVATE
drivers/joycon.cpp
drivers/joycon.h
@@ -73,8 +79,8 @@ if (ENABLE_SDL2)
helpers/joycon_protocol/ringcon.cpp
helpers/joycon_protocol/ringcon.h
helpers/joycon_protocol/rumble.cpp
- helpers/joycon_protocol/rumble.h
- )
+ helpers/joycon_protocol/rumble.h)
+
target_link_libraries(input_common PRIVATE SDL2::SDL2)
target_compile_definitions(input_common PRIVATE HAVE_SDL2)
endif()
@@ -82,19 +88,11 @@ endif()
if (ENABLE_LIBUSB)
target_sources(input_common PRIVATE
drivers/gc_adapter.cpp
- drivers/gc_adapter.h
- )
+ drivers/gc_adapter.h)
+
target_link_libraries(input_common PRIVATE libusb::usb)
target_compile_definitions(input_common PRIVATE ENABLE_LIBUSB)
endif()
create_target_directory_groups(input_common)
target_link_libraries(input_common PUBLIC hid_core PRIVATE common Boost::headers)
-
-if (ANDROID)
- target_sources(input_common PRIVATE
- drivers/android.cpp
- drivers/android.h
- )
- target_link_libraries(input_common PRIVATE android)
-endif()