diff options
author | LC <mathew1800@gmail.com> | 2020-07-14 04:21:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-14 04:21:07 +0200 |
commit | edb2caaae53109136ef6019a4ac64f5ab6defb1e (patch) | |
tree | 3d8a1ff70eb0527cb5acd2bde6016365fd371972 | |
parent | Merge pull request #4318 from lioncash/cpp20 (diff) | |
parent | input_common: drop unused libusb.h include (diff) | |
download | yuzu-edb2caaae53109136ef6019a4ac64f5ab6defb1e.tar yuzu-edb2caaae53109136ef6019a4ac64f5ab6defb1e.tar.gz yuzu-edb2caaae53109136ef6019a4ac64f5ab6defb1e.tar.bz2 yuzu-edb2caaae53109136ef6019a4ac64f5ab6defb1e.tar.lz yuzu-edb2caaae53109136ef6019a4ac64f5ab6defb1e.tar.xz yuzu-edb2caaae53109136ef6019a4ac64f5ab6defb1e.tar.zst yuzu-edb2caaae53109136ef6019a4ac64f5ab6defb1e.zip |
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/input_common/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/input_common/gcadapter/gc_adapter.cpp | 1 | ||||
-rw-r--r-- | src/input_common/gcadapter/gc_adapter.h | 5 | ||||
-rw-r--r-- | src/input_common/main.cpp | 1 |
5 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a5357335f..ce46a2c2b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -345,6 +345,7 @@ if(NOT APPLE) endif() if (NOT LIBUSB_FOUND) add_subdirectory(externals/libusb) + set(LIBUSB_INCLUDE_DIR "") set(LIBUSB_LIBRARIES usb) endif() diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index 3bd76dd23..317c25bad 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt @@ -30,7 +30,8 @@ if(SDL2_FOUND) target_compile_definitions(input_common PRIVATE HAVE_SDL2) endif() -target_link_libraries(input_common PUBLIC ${LIBUSB_LIBRARIES}) +target_include_directories(input_common SYSTEM PRIVATE ${LIBUSB_INCLUDE_DIR}) +target_link_libraries(input_common PRIVATE ${LIBUSB_LIBRARIES}) create_target_directory_groups(input_common) target_link_libraries(input_common PUBLIC core PRIVATE common Boost::boost) diff --git a/src/input_common/gcadapter/gc_adapter.cpp b/src/input_common/gcadapter/gc_adapter.cpp index 6d9f4d9eb..c031fc22a 100644 --- a/src/input_common/gcadapter/gc_adapter.cpp +++ b/src/input_common/gcadapter/gc_adapter.cpp @@ -4,6 +4,7 @@ #include <chrono> #include <thread> +#include <libusb.h> #include "common/logging/log.h" #include "input_common/gcadapter/gc_adapter.h" diff --git a/src/input_common/gcadapter/gc_adapter.h b/src/input_common/gcadapter/gc_adapter.h index b1c2a1958..1337c260e 100644 --- a/src/input_common/gcadapter/gc_adapter.h +++ b/src/input_common/gcadapter/gc_adapter.h @@ -8,10 +8,13 @@ #include <mutex> #include <thread> #include <unordered_map> -#include <libusb.h> #include "common/common_types.h" #include "common/threadsafe_queue.h" +struct libusb_context; +struct libusb_device; +struct libusb_device_handle; + namespace GCAdapter { enum { diff --git a/src/input_common/main.cpp b/src/input_common/main.cpp index fd0af1019..b9d5d0ec3 100644 --- a/src/input_common/main.cpp +++ b/src/input_common/main.cpp @@ -4,7 +4,6 @@ #include <memory> #include <thread> -#include <libusb.h> #include "common/param_package.h" #include "input_common/analog_from_button.h" #include "input_common/gcadapter/gc_adapter.h" |