2015-09-23 20:50:24 -04:00
|
|
|
if(NOT LIBHACKRF_FOUND)
|
|
|
|
|
2018-03-30 14:39:01 -04:00
|
|
|
pkg_check_modules (LIBHACKRF_PKG libhackrf)
|
2019-01-02 15:33:45 -05:00
|
|
|
|
|
|
|
find_path(LIBHACKRF_INCLUDE_DIR
|
|
|
|
NAMES libhackrf/hackrf.h
|
|
|
|
PATHS ${HACKRF_DIR}/include
|
|
|
|
${LIBHACKRF_PKG_INCLUDE_DIRS}
|
|
|
|
/usr/include
|
|
|
|
/usr/local/include
|
2015-09-23 20:50:24 -04:00
|
|
|
)
|
|
|
|
|
2019-01-02 15:33:45 -05:00
|
|
|
find_library(LIBHACKRF_LIBRARIES
|
|
|
|
NAMES hackrf
|
|
|
|
PATHS ${HACKRF_DIR}/lib
|
|
|
|
${LIBHACKRF_PKG_LIBRARY_DIRS}
|
|
|
|
/usr/lib
|
|
|
|
/usr/local/lib
|
2015-09-23 20:50:24 -04: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)
|