aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/FindLibUSB.cmake
diff options
context:
space:
mode:
authorfuzzard <fuzzard@kodi.tv>2024-02-24 15:49:42 +1000
committerfuzzard <fuzzard@kodi.tv>2024-02-24 15:49:42 +1000
commit5f6b42fd111b28d5571923152c47e7094de5e3cd (patch)
tree696c9a9f09acf7fd0cad7bd770f55a03ce05886f /cmake/modules/FindLibUSB.cmake
parent480476cb59264f54d0c85da2529d2bd64a4874ad (diff)
[cmake] Cleanup and modernisation
add find_package(pkgconfig) where missing Use HINTS instead of PATHS as the paths are provided by other things such as pkgconfig As per cmake docs https://cmake.org/cmake/help/latest/command/find_library.html Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option. Pull version requirements out of modules
Diffstat (limited to 'cmake/modules/FindLibUSB.cmake')
-rw-r--r--cmake/modules/FindLibUSB.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/modules/FindLibUSB.cmake b/cmake/modules/FindLibUSB.cmake
index 4efc670d46..2610ffbafe 100644
--- a/cmake/modules/FindLibUSB.cmake
+++ b/cmake/modules/FindLibUSB.cmake
@@ -15,10 +15,10 @@ if(NOT TARGET LibUSB::LibUSB)
endif()
find_path(LIBUSB_INCLUDE_DIR usb.h
- PATHS ${PC_LIBUSB_INCLUDEDIR}
+ HINTS ${PC_LIBUSB_INCLUDEDIR}
NO_CACHE)
find_library(LIBUSB_LIBRARY NAMES usb
- PATHS ${PC_LIBUSB_INCLUDEDIR}
+ HINTS ${PC_LIBUSB_INCLUDEDIR}
NO_CACHE)
set(LIBUSB_VERSION ${PC_LIBUSB_VERSION})