summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2024-05-21 22:36:45 +0200
committerGitHub <noreply@github.com>2024-05-21 22:36:45 +0200
commit2ba6093b30eb9fcc9ab4ec2808ed68ff6eb43ba9 (patch)
tree126931aafef432e871ae4948323ca0c3b7053d73
parent35ee08ba9fd0425d019bc0ef0054cad6b0fab52f (diff)
parentc1e6316bdc72ba5ab44332f4d530bfd79f9f6637 (diff)
Merge pull request #12767 from guijan/libusb-pc
use pkg-config to find libusb
-rw-r--r--CMakeLists.txt4
-rw-r--r--Externals/hidapi/CMakeLists.txt2
2 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b71bcd0ec6..a1bfd5ad4b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -703,7 +703,9 @@ include_directories(Externals/soundtouch)
dolphin_find_optional_system_library(CUBEB Externals/cubeb)
if(NOT ANDROID)
- dolphin_find_optional_system_library(LibUSB Externals/libusb)
+ dolphin_find_optional_system_library_pkgconfig(
+ LibUSB libusb-1.0 LibUSB::LibUSB Externals/libusb
+ )
add_definitions(-D__LIBUSB__)
endif()
diff --git a/Externals/hidapi/CMakeLists.txt b/Externals/hidapi/CMakeLists.txt
index 6ea9d24e4f..210643caf0 100644
--- a/Externals/hidapi/CMakeLists.txt
+++ b/Externals/hidapi/CMakeLists.txt
@@ -15,7 +15,7 @@ else()
target_link_libraries(hidapi PRIVATE udev)
else()
target_sources(hidapi PRIVATE hidapi-src/libusb/hid.c)
- target_link_libraries(hidapi PRIVATE ${LIBUSB_LIBRARIES})
+ target_link_libraries(hidapi PRIVATE LibUSB::LibUSB)
endif()
endif()