aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gr-usrptest/cmake/Modules/usrptestConfig.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gr-usrptest/cmake/Modules/usrptestConfig.cmake')
-rw-r--r--tools/gr-usrptest/cmake/Modules/usrptestConfig.cmake30
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/gr-usrptest/cmake/Modules/usrptestConfig.cmake b/tools/gr-usrptest/cmake/Modules/usrptestConfig.cmake
new file mode 100644
index 000000000..5244d466e
--- /dev/null
+++ b/tools/gr-usrptest/cmake/Modules/usrptestConfig.cmake
@@ -0,0 +1,30 @@
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(PC_USRPTEST usrptest)
+
+FIND_PATH(
+ USRPTEST_INCLUDE_DIRS
+ NAMES usrptest/api.h
+ HINTS $ENV{USRPTEST_DIR}/include
+ ${PC_USRPTEST_INCLUDEDIR}
+ PATHS ${CMAKE_INSTALL_PREFIX}/include
+ /usr/local/include
+ /usr/include
+)
+
+FIND_LIBRARY(
+ USRPTEST_LIBRARIES
+ NAMES gnuradio-usrptest
+ HINTS $ENV{USRPTEST_DIR}/lib
+ ${PC_USRPTEST_LIBDIR}
+ PATHS ${CMAKE_INSTALL_PREFIX}/lib
+ ${CMAKE_INSTALL_PREFIX}/lib64
+ /usr/local/lib
+ /usr/local/lib64
+ /usr/lib
+ /usr/lib64
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(USRPTEST DEFAULT_MSG USRPTEST_LIBRARIES USRPTEST_INCLUDE_DIRS)
+MARK_AS_ADVANCED(USRPTEST_LIBRARIES USRPTEST_INCLUDE_DIRS)
+