2 if(NOT LIBRTLSDR_FOUND)
3 pkg_check_modules (LIBRTLSDR_PKG librtlsdr)
4 find_path(LIBRTLSDR_INCLUDE_DIRS NAMES rtl-sdr.h
6 ${LIBRTLSDR_PKG_INCLUDE_DIRS}
11 find_library(LIBRTLSDR_LIBRARIES NAMES rtlsdr
13 ${LIBRTLSDR_PKG_LIBRARY_DIRS}
18 if(LIBRTLSDR_INCLUDE_DIRS AND LIBRTLSDR_LIBRARIES)
19 set(LIBRTLSDR_FOUND TRUE CACHE INTERNAL "librtlsdr found")
20 message(STATUS "Found librtlsdr: ${LIBRTLSDR_INCLUDE_DIRS}, ${LIBRTLSDR_LIBRARIES}")
21 else(LIBRTLSDR_INCLUDE_DIRS AND LIBRTLSDR_LIBRARIES)
22 set(LIBRTLSDR_FOUND FALSE CACHE INTERNAL "librtlsdr found")
23 message(STATUS "librtlsdr not found.")
24 endif(LIBRTLSDR_INCLUDE_DIRS AND LIBRTLSDR_LIBRARIES)
26 mark_as_advanced(LIBRTLSDR_LIBRARIES LIBRTLSDR_INCLUDE_DIRS)
28 endif(NOT LIBRTLSDR_FOUND)