Detect BladeRF Micro compatible drivers

This commit is contained in:
Xavier Arteaga 2018-10-11 08:48:22 +02:00
parent 30834968b2
commit 8559af55c5
1 changed files with 8 additions and 2 deletions

View File

@ -15,8 +15,14 @@ if(NOT BLADERF_FOUND)
)
if(BLADERF_INCLUDE_DIRS AND BLADERF_LIBRARIES)
set(BLADERF_FOUND TRUE CACHE INTERNAL "libbladeRF found")
message(STATUS "Found libbladeRF: ${BLADERF_INCLUDE_DIRS}, ${BLADERF_LIBRARIES}")
CHECK_LIBRARY_EXISTS(bladeRF bladerf_get_board_name BLADERF_LIBRARIES BLADERF_VERSION_OK)
if (BLADERF_VERSION_OK)
set(BLADERF_FOUND TRUE CACHE INTERNAL "libbladeRF found")
message(STATUS "Found libbladeRF: ${BLADERF_INCLUDE_DIRS}, ${BLADERF_LIBRARIES}")
else (BLADERF_VERSION_OK)
set(BLADERF_FOUND FALSE CACHE INTERNAL "libbladeRF found")
message(STATUS "libbladeRF found but not compatible. Upgrade your driver or use SoapySDR.")
endif (BLADERF_VERSION_OK)
else(BLADERF_INCLUDE_DIRS AND BLADERF_LIBRARIES)
set(BLADERF_FOUND FALSE CACHE INTERNAL "libbladeRF found")
message(STATUS "libbladeRF not found.")