1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-04 16:01:14 -05:00
sdrangel/cmake/Modules/FindLibHACKRF.cmake

32 lines
947 B
CMake
Raw Normal View History

if(NOT LIBHACKRF_FOUND)
pkg_check_modules (LIBHACKRF_PKG libhackrf)
find_path(LIBHACKRF_INCLUDE_DIR
NAMES libhackrf/hackrf.h
PATHS ${HACKRF_DIR}/include
${LIBHACKRF_PKG_INCLUDE_DIRS}
/usr/include
/usr/local/include
)
find_library(LIBHACKRF_LIBRARIES
NAMES hackrf
PATHS ${HACKRF_DIR}/lib
${LIBHACKRF_PKG_LIBRARY_DIRS}
/usr/lib
/usr/local/lib
)
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)