1 --- efl-webkit/Source/cmake/FindGStreamer.cmake.orig 2014-01-16 11:15:20.000000000 +0100
2 +++ efl-webkit/Source/cmake/FindGStreamer.cmake 2015-11-22 13:21:55.021797509 +0100
4 # Helper macro to find a GStreamer plugin (or GStreamer itself)
5 # _component_prefix is prepended to the _INCLUDE_DIRS and _LIBRARIES variables (eg. "GSTREAMER_AUDIO")
6 # _pkgconfig_name is the component's pkg-config name (eg. "gstreamer-1.0", or "gstreamer-video-1.0").
7 -# _header is the component's header, relative to the gstreamer-1.0 directory (eg. "gst/gst.h").
8 # _library is the component's library name (eg. "gstreamer-1.0" or "gstvideo-1.0")
9 -macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
10 - pkg_check_modules(PC_${_component_prefix} QUIET ${_pkgconfig_name})
11 +macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _library)
13 - find_path(${_component_prefix}_INCLUDE_DIRS
15 - HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}
16 - PATH_SUFFIXES gstreamer-1.0
18 + string(REGEX MATCH "(.*)>=(.*)" _dummy "${_pkgconfig_name}")
19 + if ("${CMAKE_MATCH_2}" STREQUAL "")
20 + pkg_check_modules(PC_${_component_prefix} "${_pkgconfig_name} >= ${GStreamer_FIND_VERSION}")
22 + pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})
24 + set(${_component_prefix}_INCLUDE_DIRS ${PC_${_component_prefix}_INCLUDE_DIRS})
26 find_library(${_component_prefix}_LIBRARIES
29 # ------------------------
31 # 1.1. Find headers and libraries
32 -FIND_GSTREAMER_COMPONENT(GSTREAMER gstreamer-1.0 gst/gst.h gstreamer-1.0)
33 -FIND_GSTREAMER_COMPONENT(GSTREAMER_BASE gstreamer-base-1.0 gst/gst.h gstbase-1.0)
35 -# 1.2. Check GStreamer version
36 -if (GSTREAMER_INCLUDE_DIRS)
37 - if (EXISTS "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h")
38 - file(READ "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h" GSTREAMER_VERSION_CONTENTS)
40 - string(REGEX MATCH "#define +GST_VERSION_MAJOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
41 - set(GSTREAMER_VERSION_MAJOR "${CMAKE_MATCH_1}")
43 - string(REGEX MATCH "#define +GST_VERSION_MINOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
44 - set(GSTREAMER_VERSION_MINOR "${CMAKE_MATCH_1}")
46 - string(REGEX MATCH "#define +GST_VERSION_MICRO +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
47 - set(GSTREAMER_VERSION_MICRO "${CMAKE_MATCH_1}")
49 - set(GSTREAMER_VERSION "${GSTREAMER_VERSION_MAJOR}.${GSTREAMER_VERSION_MINOR}.${GSTREAMER_VERSION_MICRO}")
53 -if ("${GStreamer_FIND_VERSION}" VERSION_GREATER "${GSTREAMER_VERSION}")
54 - message(FATAL_ERROR "Required version (" ${GStreamer_FIND_VERSION} ") is higher than found version (" ${GSTREAMER_VERSION} ")")
56 +FIND_GSTREAMER_COMPONENT(GSTREAMER gstreamer-1.0 gstreamer-1.0)
57 +FIND_GSTREAMER_COMPONENT(GSTREAMER_BASE gstreamer-base-1.0 gstbase-1.0)
59 # -------------------------
60 # 2. Find GStreamer plugins
61 # -------------------------
63 -FIND_GSTREAMER_COMPONENT(GSTREAMER_APP gstreamer-app-1.0 gst/app/gstappsink.h gstapp-1.0)
64 -FIND_GSTREAMER_COMPONENT(GSTREAMER_AUDIO gstreamer-audio-1.0 gst/audio/audio.h gstaudio-1.0)
65 -FIND_GSTREAMER_COMPONENT(GSTREAMER_FFT gstreamer-fft-1.0 gst/fft/gstfft.h gstfft-1.0)
66 -FIND_GSTREAMER_COMPONENT(GSTREAMER_PBUTILS gstreamer-pbutils-1.0 gst/pbutils/pbutils.h gstpbutils-1.0)
67 -FIND_GSTREAMER_COMPONENT(GSTREAMER_VIDEO gstreamer-video-1.0 gst/video/video.h gstvideo-1.0)
68 +FIND_GSTREAMER_COMPONENT(GSTREAMER_APP gstreamer-app-1.0 gstapp-1.0)
69 +FIND_GSTREAMER_COMPONENT(GSTREAMER_AUDIO gstreamer-audio-1.0 gstaudio-1.0)
70 +FIND_GSTREAMER_COMPONENT(GSTREAMER_FFT gstreamer-fft-1.0 gstfft-1.0)
71 +FIND_GSTREAMER_COMPONENT(GSTREAMER_PBUTILS gstreamer-pbutils-1.0 gstpbutils-1.0)
72 +FIND_GSTREAMER_COMPONENT(GSTREAMER_VIDEO gstreamer-video-1.0 gstvideo-1.0)
74 # ------------------------------------------------
75 # 3. Process the COMPONENTS passed to FIND_PACKAGE