From c177ed3331d1cf5850cd426fd6c23f9bede022c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20F=C3=BCrste?= Date: Mon, 13 Sep 2021 15:21:24 +0200 Subject: [PATCH] cmake: Export non-default libbladerf driver path --- cmake/modules/FindbladeRF.cmake | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/cmake/modules/FindbladeRF.cmake b/cmake/modules/FindbladeRF.cmake index 265015fbe..0e97fa395 100644 --- a/cmake/modules/FindbladeRF.cmake +++ b/cmake/modules/FindbladeRF.cmake @@ -8,18 +8,21 @@ if(NOT BLADERF_FOUND) pkg_check_modules (BLADERF_PKG libbladeRF) - find_path(BLADERF_INCLUDE_DIRS NAMES libbladeRF.h - PATHS - ${BLADERF_PKG_INCLUDE_DIRS} - /usr/include - /usr/local/include + + find_path(BLADERF_INCLUDE_DIRS + NAMES libbladeRF.h + HINTS $ENV{BLADERF_DIR}/include + PATHS ${BLADERF_PKG_INCLUDE_DIRS} + /usr/include + /usr/local/include ) - find_library(BLADERF_LIBRARIES NAMES bladeRF - PATHS - ${BLADERF_PKG_LIBRARY_DIRS} - /usr/lib - /usr/local/lib + find_library(BLADERF_LIBRARIES + NAMES bladeRF + HINTS $ENV{BLADERF_DIR}/lib + PATHS ${BLADERF_PKG_LIBRARY_DIRS} + /usr/lib + /usr/local/lib ) if(BLADERF_INCLUDE_DIRS AND BLADERF_LIBRARIES)