⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 176565 in webkit


Ignore:
Timestamp:
Nov 28, 2014, 7:27:47 AM (12 years ago)
Author:
Philippe Normand
Message:

[CMake] Build failure against GStreamer git master
https://bugs.webkit.org/show_bug.cgi?id=138872

Reviewed by Csaba Osztrogon.

  • Source/cmake/FindGStreamer.cmake: Simplified the

FIND_GSTREAMER_COMPONENT macro. Trust pkg-config for include
headers lookup, there's no need to do this manually. Also
explicitely check the version specified in GStreamer_FIND_VERSION.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r176555 r176565  
     12014-11-28  Philippe Normand  <pnormand@igalia.com>
     2
     3        [CMake] Build failure against GStreamer git master
     4        https://bugs.webkit.org/show_bug.cgi?id=138872
     5
     6        Reviewed by Csaba Osztrogon.
     7
     8        * Source/cmake/FindGStreamer.cmake: Simplified the
     9        FIND_GSTREAMER_COMPONENT macro. Trust pkg-config for include
     10        headers lookup, there's no need to do this manually. Also
     11        explicitely check the version specified in GStreamer_FIND_VERSION.
     12
    1132014-11-27  Ryuan Choi  <ryuan.choi@navercorp.com>
    214
  • trunk/Source/cmake/FindGStreamer.cmake

    r171339 r176565  
    5353#   _component_prefix is prepended to the _INCLUDE_DIRS and _LIBRARIES variables (eg. "GSTREAMER_AUDIO")
    5454#   _pkgconfig_name is the component's pkg-config name (eg. "gstreamer-1.0", or "gstreamer-video-1.0").
    55 #   _header is the component's header, relative to the gstreamer-1.0 directory (eg. "gst/gst.h").
    5655#   _library is the component's library name (eg. "gstreamer-1.0" or "gstvideo-1.0")
    57 macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
    58     pkg_check_modules(PC_${_component_prefix} QUIET ${_pkgconfig_name})
     56macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _library)
    5957
    60     find_path(${_component_prefix}_INCLUDE_DIRS
    61         NAMES ${_header}
    62         HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}
    63         PATH_SUFFIXES gstreamer-1.0
    64     )
     58    string(REGEX MATCH "(.*)>=(.*)" _dummy "${_pkgconfig_name}")
     59    if ("${CMAKE_MATCH_2}" STREQUAL "")
     60        pkg_check_modules(PC_${_component_prefix} "${_pkgconfig_name} >= ${GStreamer_FIND_VERSION}")
     61    else ()
     62        pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})
     63    endif ()
     64    set(${_component_prefix}_INCLUDE_DIRS ${PC_${_component_prefix}_INCLUDE_DIRS})
    6565
    6666    find_library(${_component_prefix}_LIBRARIES
     
    7575
    7676# 1.1. Find headers and libraries
    77 FIND_GSTREAMER_COMPONENT(GSTREAMER gstreamer-1.0 gst/gst.h gstreamer-1.0)
    78 FIND_GSTREAMER_COMPONENT(GSTREAMER_BASE gstreamer-base-1.0 gst/base/gstadapter.h gstbase-1.0)
    79 
    80 # 1.2. Check GStreamer version
    81 if (GSTREAMER_INCLUDE_DIRS)
    82     if (EXISTS "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h")
    83         file(READ "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h" GSTREAMER_VERSION_CONTENTS)
    84 
    85         string(REGEX MATCH "#define +GST_VERSION_MAJOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
    86         set(GSTREAMER_VERSION_MAJOR "${CMAKE_MATCH_1}")
    87 
    88         string(REGEX MATCH "#define +GST_VERSION_MINOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
    89         set(GSTREAMER_VERSION_MINOR "${CMAKE_MATCH_1}")
    90 
    91         string(REGEX MATCH "#define +GST_VERSION_MICRO +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
    92         set(GSTREAMER_VERSION_MICRO "${CMAKE_MATCH_1}")
    93 
    94         set(GSTREAMER_VERSION "${GSTREAMER_VERSION_MAJOR}.${GSTREAMER_VERSION_MINOR}.${GSTREAMER_VERSION_MICRO}")
    95     endif ()
    96 endif ()
    97 
    98 if ("${GStreamer_FIND_VERSION}" VERSION_GREATER "${GSTREAMER_VERSION}")
    99     message(FATAL_ERROR "Required version (" ${GStreamer_FIND_VERSION} ") is higher than found version (" ${GSTREAMER_VERSION} ")")
    100 endif ()
     77FIND_GSTREAMER_COMPONENT(GSTREAMER gstreamer-1.0 gstreamer-1.0)
     78FIND_GSTREAMER_COMPONENT(GSTREAMER_BASE gstreamer-base-1.0 gstbase-1.0)
    10179
    10280# -------------------------
     
    10482# -------------------------
    10583
    106 FIND_GSTREAMER_COMPONENT(GSTREAMER_APP gstreamer-app-1.0 gst/app/gstappsink.h gstapp-1.0)
    107 FIND_GSTREAMER_COMPONENT(GSTREAMER_AUDIO gstreamer-audio-1.0 gst/audio/audio.h gstaudio-1.0)
    108 FIND_GSTREAMER_COMPONENT(GSTREAMER_FFT gstreamer-fft-1.0 gst/fft/gstfft.h gstfft-1.0)
    109 FIND_GSTREAMER_COMPONENT(GSTREAMER_MPEGTS gstreamer-mpegts-1.0>=1.4.0 gst/mpegts/mpegts.h gstmpegts-1.0)
    110 FIND_GSTREAMER_COMPONENT(GSTREAMER_PBUTILS gstreamer-pbutils-1.0 gst/pbutils/pbutils.h gstpbutils-1.0)
    111 FIND_GSTREAMER_COMPONENT(GSTREAMER_TAG gstreamer-tag-1.0 gst/tag/tag.h gsttag-1.0)
    112 FIND_GSTREAMER_COMPONENT(GSTREAMER_VIDEO gstreamer-video-1.0 gst/video/video.h gstvideo-1.0)
     84FIND_GSTREAMER_COMPONENT(GSTREAMER_APP gstreamer-app-1.0 gstapp-1.0)
     85FIND_GSTREAMER_COMPONENT(GSTREAMER_AUDIO gstreamer-audio-1.0 gstaudio-1.0)
     86FIND_GSTREAMER_COMPONENT(GSTREAMER_FFT gstreamer-fft-1.0 gstfft-1.0)
     87FIND_GSTREAMER_COMPONENT(GSTREAMER_MPEGTS gstreamer-mpegts-1.0>=1.4.0 gstmpegts-1.0)
     88FIND_GSTREAMER_COMPONENT(GSTREAMER_PBUTILS gstreamer-pbutils-1.0 gstpbutils-1.0)
     89FIND_GSTREAMER_COMPONENT(GSTREAMER_TAG gstreamer-tag-1.0 gsttag-1.0)
     90FIND_GSTREAMER_COMPONENT(GSTREAMER_VIDEO gstreamer-video-1.0 gstvideo-1.0)
    11391
    11492# ------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.