2015-09-09 23:53:37 -04:00
|
|
|
if(NOT LIBAIRSPY_FOUND)
|
|
|
|
|
|
|
|
pkg_check_modules (LIBAIRSPY_PKG libairspy)
|
2019-07-25 20:04:42 -04:00
|
|
|
|
|
|
|
find_path(LIBAIRSPY_INCLUDE_DIR
|
2019-01-02 15:33:45 -05:00
|
|
|
NAMES libairspy/airspy.h
|
2019-07-25 20:04:42 -04:00
|
|
|
HINTS ${AIRSPY_DIR}/include
|
2019-01-02 15:33:45 -05:00
|
|
|
${LIBAIRSPY_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
|
2015-09-09 23:53:37 -04:00
|
|
|
)
|
|
|
|
|
2019-07-25 20:04:42 -04:00
|
|
|
find_library(LIBAIRSPY_LIBRARIES
|
2019-01-02 15:33:45 -05:00
|
|
|
NAMES airspy
|
2019-07-25 20:04:42 -04:00
|
|
|
HINTS ${AIRSPY_DIR}/lib
|
2019-01-02 15:33:45 -05:00
|
|
|
${LIBAIRSPY_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
|
2015-09-09 23:53:37 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
if(LIBAIRSPY_INCLUDE_DIR AND LIBAIRSPY_LIBRARIES)
|
|
|
|
set(LIBAIRSPY_FOUND TRUE CACHE INTERNAL "libairspy found")
|
|
|
|
message(STATUS "Found libairspy: ${LIBAIRSPY_INCLUDE_DIR}, ${LIBAIRSPY_LIBRARIES}")
|
|
|
|
else(LIBAIRSPY_INCLUDE_DIR AND LIBAIRSPY_LIBRARIES)
|
|
|
|
set(LIBAIRSPY_FOUND FALSE CACHE INTERNAL "libairspy found")
|
|
|
|
message(STATUS "libairspy not found.")
|
|
|
|
endif(LIBAIRSPY_INCLUDE_DIR AND LIBAIRSPY_LIBRARIES)
|
|
|
|
|
|
|
|
mark_as_advanced(LIBAIRSPY_INCLUDE_DIR LIBAIRSPY_LIBRARIES)
|
|
|
|
|
|
|
|
endif(NOT LIBAIRSPY_FOUND)
|