summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorf4exb <f4exb06@gmail.com>2015-09-10 05:53:37 +0200
committerf4exb <f4exb06@gmail.com>2015-09-10 05:53:37 +0200
commit61e6e3e2cc3b7fc9d2ce4cf8642df0696b580ad2 (patch)
tree14ff462719e96046eb39f74f3ed7c904cd2fbe69 /cmake
parent1e374791305e4b4c8a183ac481f9a4799bc34356 (diff)
Support for Airspy: compiles
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindLibAIRSPY.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/cmake/Modules/FindLibAIRSPY.cmake b/cmake/Modules/FindLibAIRSPY.cmake
new file mode 100644
index 000000000..2402f2f74
--- /dev/null
+++ b/cmake/Modules/FindLibAIRSPY.cmake
@@ -0,0 +1,28 @@
+if(NOT LIBAIRSPY_FOUND)
+
+ pkg_check_modules (LIBAIRSPY_PKG libairspy)
+ find_path(LIBAIRSPY_INCLUDE_DIR NAMES libairspy/airspy.h
+ PATHS
+ ${LIBAIRSPY_PKG_INCLUDE_DIRS}
+ /usr/include
+ /usr/local/include
+ )
+
+ find_library(LIBAIRSPY_LIBRARIES NAMES airspy
+ PATHS
+ ${LIBAIRSPY_PKG_LIBRARY_DIRS}
+ /usr/lib
+ /usr/local/lib
+ )
+
+ if(LIBAIRSPY_INCLUDE_DIR AND LIBAIRSPY_LIBRARIES)
+ set(LIBAIRSPY_FOUND TRUE CACHE INTERNAL "libairspy found")
+ message(STATUS "Found libairspy: ${LIBAIRSPY_INCLUDE_DIR}, ${LIBAIRSPY_LIBRARIES}")
+ else(LIBAIRSPY_INCLUDE_DIR AND LIBAIRSPY_LIBRARIES)
+ set(LIBAIRSPY_FOUND FALSE CACHE INTERNAL "libairspy found")
+ message(STATUS "libairspy not found.")
+ endif(LIBAIRSPY_INCLUDE_DIR AND LIBAIRSPY_LIBRARIES)
+
+ mark_as_advanced(LIBAIRSPY_INCLUDE_DIR LIBAIRSPY_LIBRARIES)
+
+endif(NOT LIBAIRSPY_FOUND)