You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.8KB

  1. ############################################################################
  2. # FindSRTP.txt
  3. # Copyright (C) 2014 Belledonne Communications, Grenoble France
  4. #
  5. ############################################################################
  6. #
  7. # This program is free software; you can redistribute it and/or
  8. # modify it under the terms of the GNU General Public License
  9. # as published by the Free Software Foundation; either version 2
  10. # of the License, or (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; if not, write to the Free Software
  19. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  20. #
  21. ############################################################################
  22. #
  23. # - Find the SRTP include file and library
  24. #
  25. # SRTP_FOUND - system has SRTP
  26. # SRTP_INCLUDE_DIRS - the SRTP include directory
  27. # SRTP_LIBRARIES - The libraries needed to use SRTP
  28. set(_SRTP_ROOT_PATHS
  29. ${CMAKE_INSTALL_PREFIX}
  30. )
  31. find_path(SRTP_INCLUDE_DIRS
  32. NAMES srtp2/srtp.h
  33. HINTS _SRTP_ROOT_PATHS ${SRTP_PREFIX}
  34. PATH_SUFFIXES include
  35. )
  36. if(SRTP_INCLUDE_DIRS)
  37. set(HAVE_SRTP_SRTP_H 1)
  38. endif()
  39. find_library(SRTP_LIBRARIES
  40. NAMES srtp2
  41. HINTS ${_SRTP_ROOT_PATHS} ${SRTP_PREFIX}
  42. PATH_SUFFIXES bin lib
  43. )
  44. include(FindPackageHandleStandardArgs)
  45. find_package_handle_standard_args(SRTP
  46. DEFAULT_MSG
  47. SRTP_INCLUDE_DIRS SRTP_LIBRARIES HAVE_SRTP_SRTP_H
  48. )
  49. mark_as_advanced(SRTP_INCLUDE_DIRS SRTP_LIBRARIES HAVE_SRTP_SRTP_H)