Commit b83f3f88 authored by Ghislain MARY's avatar Ghislain MARY

Fix search for srtp library.

parent 36a2b94c
......@@ -546,7 +546,6 @@ string(REPLACE ";" " " LINK_FLAGS_STR "${LINK_FLAGS}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mediastreamer-config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/mediastreamer-config.h)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/mediastreamer-config.h PROPERTIES GENERATED ON)
add_definitions("-DHAVE_CONFIG_H")
add_definitions("-DSRTP_VERSION=${SRTP_VERSION}")
set(MEDIASTREAMER2_CPPFLAGS ${ORTP_CPPFLAGS} ${BZRTP_CPPFLAGS} ${BCTOOLBOX_CPPFLAGS} ${BCG729_CPPFLAGS})
if(ENABLE_STATIC)
......
......@@ -30,14 +30,15 @@ set(_SRTP_ROOT_PATHS
${CMAKE_INSTALL_PREFIX}
)
find_path(SRTP_INCLUDE_DIRS
find_path(SRTP2_INCLUDE_DIRS
NAMES srtp2/srtp.h
HINTS _SRTP_ROOT_PATHS
PATH_SUFFIXES include
)
if(SRTP_INCLUDE_DIRS)
if(SRTP2_INCLUDE_DIRS)
set(HAVE_SRTP_SRTP_H 1)
set(SRTP_INCLUDE_DIRS ${SRTP2_INCLUDE_DIRS})
set(SRTP_VERSION 2)
find_library(SRTP_LIBRARIES
NAMES srtp2
......@@ -65,7 +66,7 @@ endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SRTP
DEFAULT_MSG
SRTP_INCLUDE_DIRS SRTP_LIBRARIES HAVE_SRTP_SRTP_H
SRTP_INCLUDE_DIRS SRTP_LIBRARIES HAVE_SRTP_SRTP_H SRTP_VERSION
)
mark_as_advanced(SRTP_INCLUDE_DIRS SRTP_LIBRARIES HAVE_SRTP_SRTP_H)
mark_as_advanced(SRTP_INCLUDE_DIRS SRTP_LIBRARIES HAVE_SRTP_SRTP_H SRTP_VERSION)
......@@ -35,6 +35,7 @@
#define HAVE_NON_FREE_CODECS ${HAVE_NON_FREE_CODECS}
#cmakedefine HAVE_SRTP
#cmakedefine SRTP_VERSION ${SRTP_VERSION}
#cmakedefine HAVE_ZRTP
#cmakedefine HAVE_DTLS
......
......@@ -19,6 +19,10 @@
#ifndef __SRTP2_H__
#define __SRTP2_H__
#ifdef HAVE_CONFIG_H
#include "mediastreamer-config.h"
#endif
#if defined(MS2_WINDOWS_PHONE)
// Windows phone doesn't use make install
#include <srtp.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment