aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/Modules/FindGnuradioFuncube.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Modules/FindGnuradioFuncube.cmake')
-rw-r--r--cmake/Modules/FindGnuradioFuncube.cmake27
1 files changed, 27 insertions, 0 deletions
diff --git a/cmake/Modules/FindGnuradioFuncube.cmake b/cmake/Modules/FindGnuradioFuncube.cmake
new file mode 100644
index 0000000..0ed72cb
--- /dev/null
+++ b/cmake/Modules/FindGnuradioFuncube.cmake
@@ -0,0 +1,27 @@
+if(NOT GNURADIO_FUNCUBE_FOUND)
+ pkg_check_modules (GNURADIO_FUNCUBE_PKG libgnuradio-funcube)
+ find_path(GNURADIO_FUNCUBE_INCLUDE_DIRS NAMES funcube/api.h
+ PATHS
+ ${GNURADIO_FUNCUBE_PKG_INCLUDE_DIRS}
+ /usr/include
+ /usr/local/include
+ )
+
+ find_library(GNURADIO_FUNCUBE_LIBRARIES NAMES gnuradio-funcube
+ PATHS
+ ${GNURADIO_FUNCUBE_PKG_LIBRARY_DIRS}
+ /usr/lib
+ /usr/local/lib
+ )
+
+if(GNURADIO_FUNCUBE_INCLUDE_DIRS AND GNURADIO_FUNCUBE_LIBRARIES)
+ set(GNURADIO_FUNCUBE_FOUND TRUE CACHE INTERNAL "gnuradio-funcube found")
+ message(STATUS "Found gnuradio-funcube: ${GNURADIO_FUNCUBE_INCLUDE_DIRS}, ${GNURADIO_FUNCUBE_LIBRARIES}")
+else(GNURADIO_FUNCUBE_INCLUDE_DIRS AND GNURADIO_FUNCUBE_LIBRARIES)
+ set(GNURADIO_FUNCUBE_FOUND FALSE CACHE INTERNAL "gnuradio-funcube found")
+ message(STATUS "gnuradio-funcube not found.")
+endif(GNURADIO_FUNCUBE_INCLUDE_DIRS AND GNURADIO_FUNCUBE_LIBRARIES)
+
+mark_as_advanced(GNURADIO_FUNCUBE_LIBRARIES GNURADIO_FUNCUBE_INCLUDE_DIRS)
+
+endif(NOT GNURADIO_FUNCUBE_FOUND)