diff --git a/cmake/modules/FindbladeRF.cmake b/cmake/modules/FindbladeRF.cmake index 565603000..b971c3b84 100644 --- a/cmake/modules/FindbladeRF.cmake +++ b/cmake/modules/FindbladeRF.cmake @@ -15,7 +15,8 @@ if(NOT BLADERF_FOUND) ) if(BLADERF_INCLUDE_DIRS AND BLADERF_LIBRARIES) - CHECK_LIBRARY_EXISTS(bladeRF bladerf_get_board_name BLADERF_LIBRARIES BLADERF_VERSION_OK) + get_filename_component(bladerf_lib_dir ${BLADERF_LIBRARIES} DIRECTORY) + CHECK_LIBRARY_EXISTS(bladeRF bladerf_get_board_name ${bladerf_lib_dir} BLADERF_VERSION_OK) if (BLADERF_VERSION_OK) set(BLADERF_FOUND TRUE CACHE INTERNAL "libbladeRF found") message(STATUS "Found libbladeRF: ${BLADERF_INCLUDE_DIRS}, ${BLADERF_LIBRARIES}")