1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-11 17:35:16 -05:00
sdrangel/cmake/Modules/FindLibBLADERF.cmake

29 lines
877 B
CMake
Raw Normal View History

if(NOT LIBBLADERF_FOUND)
pkg_check_modules (LIBBLADERF_PKG libbladeRF)
find_path(LIBBLADERF_INCLUDE_DIR NAMES libbladeRF.h
PATHS
${LIBBLADERF_PKG_INCLUDE_DIRS}
/usr/include
/usr/local/include
)
find_library(LIBBLADERF_LIBRARIES NAMES bladeRF
PATHS
${LIBBLADERF_PKG_LIBRARY_DIRS}
/usr/lib
/usr/local/lib
)
if(LIBBLADERF_INCLUDE_DIR AND LIBBLADERF_LIBRARIES)
set(LIBBLADERF_FOUND TRUE CACHE INTERNAL "libbladerf found")
message(STATUS "Found libbladerf: ${LIBBLADERF_INCLUDE_DIR}, ${LIBBLADERF_LIBRARIES}")
else(LIBBLADERF_INCLUDE_DIR AND LIBBLADERF_LIBRARIES)
set(LIBBLADERF_FOUND FALSE CACHE INTERNAL "libbladerf found")
message(STATUS "libbladerf not found.")
endif(LIBBLADERF_INCLUDE_DIR AND LIBBLADERF_LIBRARIES)
mark_as_advanced(LIBBLADERF_INCLUDE_DIR LIBBLADERF_LIBRARIES)
endif(NOT LIBBLADERF_FOUND)