forked from pothosware/SoapyBladeRF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindLibbladeRF.cmake
28 lines (24 loc) · 891 Bytes
/
FindLibbladeRF.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
if(NOT LIBBLADERF_FOUND)
INCLUDE(FindPkgConfig)
pkg_check_modules (LIBBLADERF_PKG libbladeRF)
find_path(LIBBLADERF_INCLUDE_DIRS 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_DIRS AND LIBBLADERF_LIBRARIES)
set(LIBBLADERF_FOUND TRUE CACHE INTERNAL "libbladeRF found")
message(STATUS "Found libbladeRF: ${LIBBLADERF_INCLUDE_DIRS}, ${LIBBLADERF_LIBRARIES}")
else(LIBBLADERF_INCLUDE_DIRS AND LIBBLADERF_LIBRARIES)
set(LIBBLADERF_FOUND FALSE CACHE INTERNAL "libbladeRF found")
message(STATUS "libbladeRF not found.")
endif(LIBBLADERF_INCLUDE_DIRS AND LIBBLADERF_LIBRARIES)
mark_as_advanced(LIBBLADERF_LIBRARIES LIBBLADERF_INCLUDE_DIRS)
endif(NOT LIBBLADERF_FOUND)