From 48ff15602e89ee2b7946310dd343859d56795a67 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Thu, 9 Jul 2020 14:56:56 +0000 Subject: cmake: pass libusb include directory as well In file included from src/input_common/gcadapter/gc_adapter.cpp:8: src/./input_common/gcadapter/gc_adapter.h:11:10: fatal error: 'libusb.h' file not found #include ^~~~~~~~~~ --- src/input_common/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index 3bd76dd23..1d7e19a66 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt @@ -30,6 +30,7 @@ if(SDL2_FOUND) target_compile_definitions(input_common PRIVATE HAVE_SDL2) endif() +target_include_directories(input_common SYSTEM PUBLIC ${LIBUSB_INCLUDE_DIR}) target_link_libraries(input_common PUBLIC ${LIBUSB_LIBRARIES}) create_target_directory_groups(input_common) -- cgit v1.2.3 From 883fab2fff5ff9bdad38eee4e55bacc520ce0cc9 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Mon, 13 Jul 2020 18:48:19 +0000 Subject: input_common: make libusb private to gc_adapter --- src/input_common/CMakeLists.txt | 4 ++-- src/input_common/gcadapter/gc_adapter.cpp | 1 + src/input_common/gcadapter/gc_adapter.h | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index 1d7e19a66..317c25bad 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt @@ -30,8 +30,8 @@ if(SDL2_FOUND) target_compile_definitions(input_common PRIVATE HAVE_SDL2) endif() -target_include_directories(input_common SYSTEM PUBLIC ${LIBUSB_INCLUDE_DIR}) -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 #include +#include #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 #include #include -#include #include "common/common_types.h" #include "common/threadsafe_queue.h" +struct libusb_context; +struct libusb_device; +struct libusb_device_handle; + namespace GCAdapter { enum { -- cgit v1.2.3 From b284c433850053dca46d2e2381b16b17d38cd048 Mon Sep 17 00:00:00 2001 From: Ameer Date: Tue, 14 Jul 2020 01:46:54 +0000 Subject: input_common: drop unused libusb.h include Remnant of an early implementation. --- src/input_common/main.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src') 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 #include -#include #include "common/param_package.h" #include "input_common/analog_from_button.h" #include "input_common/gcadapter/gc_adapter.h" -- cgit v1.2.3