summaryrefslogtreecommitdiff
path: root/gr-howto-write-a-block-cmake/cmake/Modules/FindGruel.cmake
diff options
context:
space:
mode:
authorJosh Blum2011-08-17 12:30:09 -0700
committerJosh Blum2011-08-17 12:30:09 -0700
commitfb2f45cdddc41d5aba177204aa419cea3a0aea49 (patch)
treee2d3195b9782e047518fe1ea9f848346b480cfd4 /gr-howto-write-a-block-cmake/cmake/Modules/FindGruel.cmake
parente6ed4fa7bb0d253adbf0cf2ae4da7c301b3c971f (diff)
parent626018eb037808cdc32b5eb1907ae9d5f80d3e55 (diff)
downloadgnuradio-fb2f45cdddc41d5aba177204aa419cea3a0aea49.tar.gz
gnuradio-fb2f45cdddc41d5aba177204aa419cea3a0aea49.tar.bz2
gnuradio-fb2f45cdddc41d5aba177204aa419cea3a0aea49.zip
Merge branch 'next' into digital
Diffstat (limited to 'gr-howto-write-a-block-cmake/cmake/Modules/FindGruel.cmake')
-rw-r--r--gr-howto-write-a-block-cmake/cmake/Modules/FindGruel.cmake26
1 files changed, 26 insertions, 0 deletions
diff --git a/gr-howto-write-a-block-cmake/cmake/Modules/FindGruel.cmake b/gr-howto-write-a-block-cmake/cmake/Modules/FindGruel.cmake
new file mode 100644
index 000000000..c142c905e
--- /dev/null
+++ b/gr-howto-write-a-block-cmake/cmake/Modules/FindGruel.cmake
@@ -0,0 +1,26 @@
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(GRUEL gnuradio-core)
+IF(NOT GRUEL_FOUND)
+
+FIND_PATH(
+ GRUEL_INCLUDE_DIRS
+ NAMES gruel/attributes.h
+ HINTS $ENV{GRUEL_DIR}/include
+ PATHS /usr/local/include
+ /usr/include
+)
+
+FIND_LIBRARY(
+ GRUEL_LIBRARIES
+ NAMES gruel
+ HINTS $ENV{GRUEL_DIR}/lib
+ PATHS /usr/local/lib
+ /usr/local/lib64
+ /usr/lib
+ /usr/lib64
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GRUEL DEFAULT_MSG GRUEL_LIBRARIES GRUEL_INCLUDE_DIRS)
+
+ENDIF(NOT GRUEL_FOUND)