summaryrefslogtreecommitdiffstats
path: root/cmake/FindG729.cmake
diff options
context:
space:
mode:
authorLubos Dolezel <lubos@dolezel.info>2015-06-15 10:39:38 +0200
committerLubos Dolezel <lubos@dolezel.info>2015-06-15 10:39:38 +0200
commitd27de15964fbe4b8caaf5c03e2c4e1ac9a261585 (patch)
tree51d9b8bd4762dff98db418a8a58d30f1feee9262 /cmake/FindG729.cmake
parent85dbea6b4072aaaf9f03f1f846351b33aceb9d13 (diff)
downloadtwinkle-d27de15964fbe4b8caaf5c03e2c4e1ac9a261585.tar
twinkle-d27de15964fbe4b8caaf5c03e2c4e1ac9a261585.tar.gz
twinkle-d27de15964fbe4b8caaf5c03e2c4e1ac9a261585.tar.lz
twinkle-d27de15964fbe4b8caaf5c03e2c4e1ac9a261585.tar.xz
twinkle-d27de15964fbe4b8caaf5c03e2c4e1ac9a261585.zip
Add a cmake check for bcg729 (issue #15)
Diffstat (limited to 'cmake/FindG729.cmake')
-rw-r--r--cmake/FindG729.cmake17
1 files changed, 17 insertions, 0 deletions
diff --git a/cmake/FindG729.cmake b/cmake/FindG729.cmake
new file mode 100644
index 0000000..d11a27e
--- /dev/null
+++ b/cmake/FindG729.cmake
@@ -0,0 +1,17 @@
+FIND_PATH(G729_INCLUDE_DIR bcg729/decoder.h)
+FIND_LIBRARY(G729_LIBRARIES NAMES bcg729)
+
+IF(G729_INCLUDE_DIR AND G729_LIBRARIES)
+ SET(G729_FOUND TRUE)
+ENDIF(G729_INCLUDE_DIR AND G729_LIBRARIES)
+
+IF(G729_FOUND)
+ IF (NOT G729_FIND_QUIETLY)
+ MESSAGE(STATUS "Found bcg729 includes: ${G729_INCLUDE_DIR}/bcg729/decoder.h")
+ MESSAGE(STATUS "Found bcg729 library: ${G729_LIBRARIES}")
+ ENDIF (NOT G729_FIND_QUIETLY)
+ELSE(G729_FOUND)
+ IF (G729_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could NOT find bcg729 development files")
+ ENDIF (G729_FIND_REQUIRED)
+ENDIF(G729_FOUND)