2014-05-18 11:52:39 -04:00
|
|
|
if(NOT LIBRTLSDR_FOUND)
|
|
|
|
|
|
|
|
pkg_check_modules (LIBRTLSDR_PKG librtlsdr)
|
2019-07-25 20:04:42 -04:00
|
|
|
|
|
|
|
find_path(LIBRTLSDR_INCLUDE_DIR
|
2019-01-02 15:33:45 -05:00
|
|
|
NAMES rtl-sdr.h
|
2019-07-25 20:04:42 -04:00
|
|
|
HINTS ${RTLSDR_DIR}/include
|
2019-01-02 15:33:45 -05:00
|
|
|
${LIBRTLSDR_PKG_INCLUDE_DIRS}
|
2019-07-25 20:04:42 -04:00
|
|
|
PATHS /usr/include
|
2019-01-02 15:33:45 -05:00
|
|
|
/usr/local/include
|
2014-05-18 11:52:39 -04:00
|
|
|
)
|
|
|
|
|
2019-07-25 20:04:42 -04:00
|
|
|
find_library(LIBRTLSDR_LIBRARIES
|
2019-01-02 15:33:45 -05:00
|
|
|
NAMES rtlsdr
|
2019-07-25 20:04:42 -04:00
|
|
|
HINTS ${RTLSDR_DIR}/lib
|
2019-01-02 15:33:45 -05:00
|
|
|
${LIBRTLSDR_PKG_LIBRARY_DIRS}
|
2019-07-25 20:04:42 -04:00
|
|
|
PATHS /usr/lib
|
2019-01-02 15:33:45 -05:00
|
|
|
/usr/local/lib
|
2014-05-18 11:52:39 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
if(LIBRTLSDR_INCLUDE_DIR AND LIBRTLSDR_LIBRARIES)
|
|
|
|
set(LIBRTLSDR_FOUND TRUE CACHE INTERNAL "librtlsdr found")
|
|
|
|
message(STATUS "Found librtlsdr: ${LIBRTLSDR_INCLUDE_DIR}, ${LIBRTLSDR_LIBRARIES}")
|
|
|
|
else(LIBRTLSDR_INCLUDE_DIR AND LIBRTLSDR_LIBRARIES)
|
|
|
|
set(LIBRTLSDR_FOUND FALSE CACHE INTERNAL "librtlsdr found")
|
|
|
|
message(STATUS "librtlsdr not found.")
|
|
|
|
endif(LIBRTLSDR_INCLUDE_DIR AND LIBRTLSDR_LIBRARIES)
|
|
|
|
|
|
|
|
mark_as_advanced(LIBRTLSDR_INCLUDE_DIR LIBRTLSDR_LIBRARIES)
|
|
|
|
|
|
|
|
endif(NOT LIBRTLSDR_FOUND)
|