mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 12:56:27 -05:00
Merge pull request #4280 from jbeich/system-libusb
cmake: pass libusb include directory
This commit is contained in:
commit
edb2caaae5
5 changed files with 8 additions and 3 deletions
|
@ -345,6 +345,7 @@ if(NOT APPLE)
|
||||||
endif()
|
endif()
|
||||||
if (NOT LIBUSB_FOUND)
|
if (NOT LIBUSB_FOUND)
|
||||||
add_subdirectory(externals/libusb)
|
add_subdirectory(externals/libusb)
|
||||||
|
set(LIBUSB_INCLUDE_DIR "")
|
||||||
set(LIBUSB_LIBRARIES usb)
|
set(LIBUSB_LIBRARIES usb)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,8 @@ if(SDL2_FOUND)
|
||||||
target_compile_definitions(input_common PRIVATE HAVE_SDL2)
|
target_compile_definitions(input_common PRIVATE HAVE_SDL2)
|
||||||
endif()
|
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)
|
create_target_directory_groups(input_common)
|
||||||
target_link_libraries(input_common PUBLIC core PRIVATE common Boost::boost)
|
target_link_libraries(input_common PUBLIC core PRIVATE common Boost::boost)
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
#include <libusb.h>
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "input_common/gcadapter/gc_adapter.h"
|
#include "input_common/gcadapter/gc_adapter.h"
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,13 @@
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <libusb.h>
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/threadsafe_queue.h"
|
#include "common/threadsafe_queue.h"
|
||||||
|
|
||||||
|
struct libusb_context;
|
||||||
|
struct libusb_device;
|
||||||
|
struct libusb_device_handle;
|
||||||
|
|
||||||
namespace GCAdapter {
|
namespace GCAdapter {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <libusb.h>
|
|
||||||
#include "common/param_package.h"
|
#include "common/param_package.h"
|
||||||
#include "input_common/analog_from_button.h"
|
#include "input_common/analog_from_button.h"
|
||||||
#include "input_common/gcadapter/gc_adapter.h"
|
#include "input_common/gcadapter/gc_adapter.h"
|
||||||
|
|
Loading…
Reference in a new issue