From 1738706c5904d253a71b67b665babd6786ff498a Mon Sep 17 00:00:00 2001 From: Ryzerth Date: Thu, 29 Apr 2021 19:12:54 +0200 Subject: [PATCH] Fixed libusb not found for rtlsdr on OSX --- rtl_sdr_source/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rtl_sdr_source/CMakeLists.txt b/rtl_sdr_source/CMakeLists.txt index 61521c33..43ea7dbb 100644 --- a/rtl_sdr_source/CMakeLists.txt +++ b/rtl_sdr_source/CMakeLists.txt @@ -26,10 +26,11 @@ else (MSVC) find_package(PkgConfig) pkg_check_modules(LIBRTLSDR REQUIRED librtlsdr) + pkg_check_modules(LIBUSB REQUIRED libusb-1.0) - target_include_directories(rtl_sdr_source PUBLIC ${LIBRTLSDR_INCLUDE_DIRS}) - target_link_directories(rtl_sdr_source PUBLIC ${LIBRTLSDR_LIBRARY_DIRS}) - target_link_libraries(rtl_sdr_source PUBLIC ${LIBRTLSDR_LIBRARIES}) + target_include_directories(rtl_sdr_source PUBLIC ${LIBRTLSDR_INCLUDE_DIRS} ${LIBUSB_INCLUDE_DIRS}) + target_link_directories(rtl_sdr_source PUBLIC ${LIBRTLSDR_LIBRARY_DIRS} ${LIBUSB_LIBRARY_DIRS}) + target_link_libraries(rtl_sdr_source PUBLIC ${LIBRTLSDR_LIBRARIES} ${LIBUSB_LIBRARIES}) endif () # Install directives