summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt40
-rw-r--r--cmake/FindIlbc.cmake17
-rw-r--r--cmake/FindSpeex.cmake17
-rw-r--r--cmake/FindZrtpcpp.cmake17
4 files changed, 91 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..f698e29
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,40 @@
+project(twinkle)
+
+cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
+
+OPTION(WITH_ZRTP "Enable ZRTP encrypted calls" OFF)
+OPTION(WITH_SPEEX "Enable the Speex codec" OFF)
+OPTION(WITH_ILBC "Enable the iLBC codec" OFF)
+
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
+find_package(Qt4 REQUIRED)
+
+if (WITH_ZRTP)
+ find_package(Zrtpcpp)
+
+ if (ZRTPCPP_FOUND)
+ message(STATUS "libzrtpcpp OK")
+ else (ZRTPCPP_FOUND)
+ message(FATAL_ERROR "libzrtpcpp not found!")
+ endif (ZRTPCPP_FOUND)
+endif (WITH_ZRTP)
+
+if (WITH_SPEEX)
+ find_package(Speex)
+
+ if (SPEEX_FOUND)
+ message(STATUS "Speex OK")
+ else (SPEEX_FOUND)
+ message(FATAL_ERROR "Speex not found!")
+ endif (SPEEX_FOUND)
+endif (WITH_SPEEX)
+
+if (WITH_ILBC)
+ find_package(Ilbc)
+
+ if (ILBC_FOUND)
+ message(STATUS "iLBC OK")
+ else (ILBC_FOUND)
+ message(FATAL_ERROR "iLBC not found!")
+ endif (ILBC_FOUND)
+endif (WITH_ILBC)
diff --git a/cmake/FindIlbc.cmake b/cmake/FindIlbc.cmake
new file mode 100644
index 0000000..f66ca55
--- /dev/null
+++ b/cmake/FindIlbc.cmake
@@ -0,0 +1,17 @@
+FIND_PATH(ILBC_INCLUDE_DIR ilbc/iLBC_decode.h)
+FIND_LIBRARY(ILBC_LIBRARIES NAMES ilbc)
+
+IF(ILBC_INCLUDE_DIR AND ILBC_LIBRARIES)
+ SET(ILBC_FOUND TRUE)
+ENDIF(ILBC_INCLUDE_DIR AND ILBC_LIBRARIES)
+
+IF(ILBC_FOUND)
+ IF (NOT Ilbc_FIND_QUIETLY)
+ MESSAGE(STATUS "Found ilbc includes: ${ILBC_INCLUDE_DIR}/ilbc/iLBC_decode.h")
+ MESSAGE(STATUS "Found ilbc library: ${ILBC_LIBRARIES}")
+ ENDIF (NOT Ilbc_FIND_QUIETLY)
+ELSE(ILBC_FOUND)
+ IF (Ilbc_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could NOT find ilbc development files")
+ ENDIF (Ilbc_FIND_REQUIRED)
+ENDIF(ILBC_FOUND)
diff --git a/cmake/FindSpeex.cmake b/cmake/FindSpeex.cmake
new file mode 100644
index 0000000..ff801fa
--- /dev/null
+++ b/cmake/FindSpeex.cmake
@@ -0,0 +1,17 @@
+FIND_PATH(SPEEX_INCLUDE_DIR speex/speex.h)
+FIND_LIBRARY(SPEEX_LIBRARIES NAMES speex)
+
+IF(SPEEX_INCLUDE_DIR AND SPEEX_LIBRARIES)
+ SET(SPEEX_FOUND TRUE)
+ENDIF(SPEEX_INCLUDE_DIR AND SPEEX_LIBRARIES)
+
+IF(SPEEX_FOUND)
+ IF (NOT Speex_FIND_QUIETLY)
+ MESSAGE(STATUS "Found speex includes: ${SPEEX_INCLUDE_DIR}/speex/speex.h")
+ MESSAGE(STATUS "Found speex library: ${SPEEX_LIBRARIES}")
+ ENDIF (NOT Speex_FIND_QUIETLY)
+ELSE(SPEEX_FOUND)
+ IF (Speex_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could NOT find speex development files")
+ ENDIF (Speex_FIND_REQUIRED)
+ENDIF(SPEEX_FOUND)
diff --git a/cmake/FindZrtpcpp.cmake b/cmake/FindZrtpcpp.cmake
new file mode 100644
index 0000000..8f09150
--- /dev/null
+++ b/cmake/FindZrtpcpp.cmake
@@ -0,0 +1,17 @@
+FIND_PATH(ZRTPCPP_INCLUDE_DIR libzrtpcpp/ZrtpConfigure.h)
+FIND_LIBRARY(ZRTPCPP_LIBRARIES NAMES zrtpcpp)
+
+IF(ZRTPCPP_INCLUDE_DIR AND ZRTPCPP_LIBRARIES)
+ SET(ZRTPCPP_FOUND TRUE)
+ENDIF(ZRTPCPP_INCLUDE_DIR AND ZRTPCPP_LIBRARIES)
+
+IF(ZRTPCPP_FOUND)
+ IF (NOT Zrtpcpp_FIND_QUIETLY)
+ MESSAGE(STATUS "Found libzrtpcpp includes: ${ZRTPCPP_INCLUDE_DIR}/libzrtpcpp/ZrtpConfigure.h")
+ MESSAGE(STATUS "Found libzrtpcpp library: ${ZRTPCPP_LIBRARIES}")
+ ENDIF (NOT Zrtpcpp_FIND_QUIETLY)
+ELSE(ZRTPCPP_FOUND)
+ IF (Zrtpcpp_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could NOT find libzrtpcpp development files")
+ ENDIF (Zrtpcpp_FIND_REQUIRED)
+ENDIF(ZRTPCPP_FOUND)