diff options
| author | 2022-12-28 17:26:46 -0500 | |
|---|---|---|
| committer | 2022-12-28 17:26:46 -0500 | |
| commit | be43b62d79cc03f9908ce5036f96a94e9053ba65 (patch) | |
| tree | 0c55f4709eb56914520aa711f5735a96877fda1f /src/input_common/CMakeLists.txt | |
| parent | cmake: ignore missing package finders for packages with submodule fallbacks (diff) | |
| download | yuzu-be43b62d79cc03f9908ce5036f96a94e9053ba65.tar.gz yuzu-be43b62d79cc03f9908ce5036f96a94e9053ba65.tar.xz yuzu-be43b62d79cc03f9908ce5036f96a94e9053ba65.zip | |
cmake: make libusb optional
Diffstat (limited to 'src/input_common/CMakeLists.txt')
| -rw-r--r-- | src/input_common/CMakeLists.txt | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index f24c89b04..cef2c4d52 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt | |||
| @@ -4,14 +4,10 @@ | |||
| 4 | add_library(input_common STATIC | 4 | add_library(input_common STATIC |
| 5 | drivers/camera.cpp | 5 | drivers/camera.cpp |
| 6 | drivers/camera.h | 6 | drivers/camera.h |
| 7 | drivers/gc_adapter.cpp | ||
| 8 | drivers/gc_adapter.h | ||
| 9 | drivers/keyboard.cpp | 7 | drivers/keyboard.cpp |
| 10 | drivers/keyboard.h | 8 | drivers/keyboard.h |
| 11 | drivers/mouse.cpp | 9 | drivers/mouse.cpp |
| 12 | drivers/mouse.h | 10 | drivers/mouse.h |
| 13 | drivers/sdl_driver.cpp | ||
| 14 | drivers/sdl_driver.h | ||
| 15 | drivers/tas_input.cpp | 11 | drivers/tas_input.cpp |
| 16 | drivers/tas_input.h | 12 | drivers/tas_input.h |
| 17 | drivers/touch_screen.cpp | 13 | drivers/touch_screen.cpp |
| @@ -62,8 +58,17 @@ if (ENABLE_SDL2) | |||
| 62 | target_compile_definitions(input_common PRIVATE HAVE_SDL2) | 58 | target_compile_definitions(input_common PRIVATE HAVE_SDL2) |
| 63 | endif() | 59 | endif() |
| 64 | 60 | ||
| 61 | if (ENABLE_LIBUSB) | ||
| 62 | target_sources(input_common PRIVATE | ||
| 63 | drivers/gc_adapter.cpp | ||
| 64 | drivers/gc_adapter.h | ||
| 65 | ) | ||
| 66 | target_link_libraries(input_common PRIVATE libusb::usb) | ||
| 67 | target_compile_definitions(input_common PRIVATE HAVE_LIBUSB) | ||
| 68 | endif() | ||
| 69 | |||
| 65 | create_target_directory_groups(input_common) | 70 | create_target_directory_groups(input_common) |
| 66 | target_link_libraries(input_common PUBLIC core PRIVATE common Boost::boost libusb::usb) | 71 | target_link_libraries(input_common PUBLIC core PRIVATE common Boost::boost) |
| 67 | 72 | ||
| 68 | if (YUZU_USE_PRECOMPILED_HEADERS) | 73 | if (YUZU_USE_PRECOMPILED_HEADERS) |
| 69 | target_precompile_headers(input_common PRIVATE precompiled_headers.h) | 74 | target_precompile_headers(input_common PRIVATE precompiled_headers.h) |