File: FindLibbladeRF.cmake

package info (click to toggle)
soapybladerf 0.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 200 kB
  • sloc: cpp: 1,778; python: 42; makefile: 8
file content (28 lines) | stat: -rw-r--r-- 891 bytes parent folder | download | duplicates (4)
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)