2015-09-24 00:50:24 +00:00
|
|
|
if(NOT LIBHACKRF_FOUND)
|
|
|
|
|
2018-03-30 18:39:01 +00:00
|
|
|
pkg_check_modules (LIBHACKRF_PKG libhackrf)
|
2019-07-26 00:04:42 +00:00
|
|
|
|
|
|
|
find_path(LIBHACKRF_INCLUDE_DIR
|
2019-01-02 20:33:45 +00:00
|
|
|
NAMES libhackrf/hackrf.h
|
2019-07-26 00:04:42 +00:00
|
|
|
HINTS ${HACKRF_DIR}/include
|
2019-01-02 20:33:45 +00:00
|
|
|
${LIBHACKRF_PKG_INCLUDE_DIRS}
|
2019-07-26 00:04:42 +00:00
|
|
|
PATHS /usr/include
|
2019-01-02 20:33:45 +00:00
|
|
|
/usr/local/include
|
2015-09-24 00:50:24 +00:00
|
|
|
)
|
|
|
|
|
2019-07-26 00:04:42 +00:00
|
|
|
find_library(LIBHACKRF_LIBRARIES
|
2019-01-02 20:33:45 +00:00
|
|
|
NAMES hackrf
|
2019-07-26 00:04:42 +00:00
|
|
|
HINTS ${HACKRF_DIR}/lib
|
2019-01-02 20:33:45 +00:00
|
|
|
${LIBHACKRF_PKG_LIBRARY_DIRS}
|
2019-07-26 00:04:42 +00:00
|
|
|
PATHS /usr/lib
|
2019-01-02 20:33:45 +00:00
|
|
|
/usr/local/lib
|
2015-09-24 00:50:24 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if(LIBHACKRF_INCLUDE_DIR AND LIBHACKRF_LIBRARIES)
|
|
|
|
set(LIBHACKRF_FOUND TRUE CACHE INTERNAL "libhackrf found")
|
|
|
|
message(STATUS "Found libhackrf: ${LIBHACKRF_INCLUDE_DIR}, ${LIBHACKRF_LIBRARIES}")
|
|
|
|
else(LIBHACKRF_INCLUDE_DIR AND LIBHACKRF_LIBRARIES)
|
|
|
|
set(LIBHACKRF_FOUND FALSE CACHE INTERNAL "libhackrf found")
|
|
|
|
message(STATUS "libhackrf not found.")
|
|
|
|
endif(LIBHACKRF_INCLUDE_DIR AND LIBHACKRF_LIBRARIES)
|
|
|
|
|
|
|
|
mark_as_advanced(LIBHACKRF_INCLUDE_DIR LIBHACKRF_LIBRARIES)
|
|
|
|
|
|
|
|
endif(NOT LIBHACKRF_FOUND)
|