1.2.1-gstreamer.patch 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. From bea27fd919b64ee8d97996409e279e1e83d13594 Mon Sep 17 00:00:00 2001
  2. From: Jean-Louis Dupond <jean-louis@dupond.be>
  3. Date: Sun, 4 Oct 2015 18:17:33 +0200
  4. Subject: [PATCH] FindGStreamer_1_0: fix build failure for new gstreamer
  5. versions
  6. ---
  7. cmake/FindGStreamer_1_0.cmake | 30 +++++++++++++++---------------
  8. 1 file changed, 15 insertions(+), 15 deletions(-)
  9. diff --git a/cmake/FindGStreamer_1_0.cmake b/cmake/FindGStreamer_1_0.cmake
  10. index f7bf990..3aa8fc6 100644
  11. --- a/cmake/FindGStreamer_1_0.cmake
  12. +++ b/cmake/FindGStreamer_1_0.cmake
  13. @@ -53,17 +53,17 @@ set(GSTREAMER_1_0_MINIMUM_VERSION 1.0.5)
  14. # Helper macro to find a Gstreamer plugin (or Gstreamer itself)
  15. # _component_prefix is prepended to the _INCLUDE_DIRS and _LIBRARIES variables (eg. "GSTREAMER_1_0_AUDIO")
  16. # _pkgconfig_name is the component's pkg-config name (eg. "gstreamer-1.0", or "gstreamer-video-1.0").
  17. -# _header is the component's header, relative to the gstreamer-1.0 directory (eg. "gst/gst.h").
  18. # _library is the component's library name (eg. "gstreamer-1.0" or "gstvideo-1.0")
  19. -macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
  20. +macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _library)
  21. # FIXME: The QUIET keyword can be used once we require CMake 2.8.2.
  22. - pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})
  23. - find_path(${_component_prefix}_INCLUDE_DIRS
  24. - NAMES ${_header}
  25. - HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}
  26. - PATH_SUFFIXES gstreamer-1.0
  27. - )
  28. + string(REGEX MATCH "(.*)>=(.*)" _dummy "${_pkgconfig_name}")
  29. + if ("${CMAKE_MATCH_2}" STREQUAL "")
  30. + pkg_check_modules(PC_${_component_prefix} "${_pkgconfig_name} >= ${GStreamer_FIND_VERSION}")
  31. + else ()
  32. + pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})
  33. + endif ()
  34. + set(${_component_prefix}_INCLUDE_DIRS ${PC_${_component_prefix}_INCLUDE_DIRS})
  35. find_library(${_component_prefix}_LIBRARIES
  36. NAMES ${_library} gstreamer_android
  37. @@ -78,8 +78,8 @@ endmacro()
  38. # 1.1. Find headers and libraries
  39. set(GLIB_ROOT_DIR ${GSTREAMER_1_0_ROOT_DIR})
  40. find_package(Glib REQUIRED)
  41. -FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0 gstreamer-1.0 gst/gst.h gstreamer-1.0)
  42. -FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_BASE gstreamer-base-1.0 gst/gst.h gstbase-1.0)
  43. +FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0 gstreamer-1.0 gstreamer-1.0)
  44. +FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_BASE gstreamer-base-1.0 gstbase-1.0)
  45. # 1.2. Check Gstreamer version
  46. if (GSTREAMER_1_0_INCLUDE_DIRS)
  47. @@ -110,11 +110,11 @@ endif ()
  48. # 2. Find Gstreamer plugins
  49. # -------------------------
  50. -FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_APP gstreamer-app-1.0 gst/app/gstappsink.h gstapp-1.0)
  51. -FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_AUDIO gstreamer-audio-1.0 gst/audio/audio.h gstaudio-1.0)
  52. -FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_FFT gstreamer-fft-1.0 gst/fft/gstfft.h gstfft-1.0)
  53. -FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_PBUTILS gstreamer-pbutils-1.0 gst/pbutils/pbutils.h gstpbutils-1.0)
  54. -FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_VIDEO gstreamer-video-1.0 gst/video/video.h gstvideo-1.0)
  55. +FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_APP gstreamer-app-1.0 gstapp-1.0)
  56. +FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_AUDIO gstreamer-audio-1.0 gstaudio-1.0)
  57. +FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_FFT gstreamer-fft-1.0 gstfft-1.0)
  58. +FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_PBUTILS gstreamer-pbutils-1.0 gstpbutils-1.0)
  59. +FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_VIDEO gstreamer-video-1.0 gstvideo-1.0)
  60. # ------------------------------------------------
  61. # 3. Process the COMPONENTS passed to FIND_PACKAGE
  62. --
  63. 2.6.3