Title: [116453] trunk
Revision
116453
Author
[email protected]
Date
2012-05-08 13:32:34 -0700 (Tue, 08 May 2012)

Log Message

[CMake] Rewrite FindGStreamer.cmake.
https://bugs.webkit.org/show_bug.cgi?id=85857

Reviewed by Daniel Bates.

.:

We are currently kind of duplicating the same
FindGStreamer-Foo.cmake file whenever a new GStreamer plugin needs
to be found. Besides this approach not scaling very well, it
relies on pkg-config for version checking, uses the LibFindMacros
package that we should deprecate and all the find files could be
merged into one, with users using the COMPONENTS feature of the
FIND_PACKAGE() call to find the desired plugins.

FindGStreamer.cmake has then been rewritten to take all that into
account:
- The LibFindMacros.cmake package is not used anymore.
- Version check is performed in the CMake file itself by parsing
the gstversion.h header.
- All GStreamer plugins are searched and the COMPONENTS keyword
used in the FIND_PACKAGE() call is used to check which plugins are
required.
- The plugins-base and base GStreamer plugins are not searched, as
they were not used anywhere in the build system.

* Source/cmake/FindGStreamer-App.cmake: Removed.
* Source/cmake/FindGStreamer-Audio.cmake: Removed.
* Source/cmake/FindGStreamer-Base.cmake: Removed.
* Source/cmake/FindGStreamer-FFT.cmake: Removed.
* Source/cmake/FindGStreamer-Interfaces.cmake: Removed.
* Source/cmake/FindGStreamer-Pbutils.cmake: Removed.
* Source/cmake/FindGStreamer-Plugins-Base.cmake: Removed.
* Source/cmake/FindGStreamer-Video.cmake: Removed.
* Source/cmake/FindGStreamer.cmake: Rewrite as described above.
* Source/cmake/OptionsEfl.cmake: Use COMPONENTS to specify which
GStreamer plugins to look for.

Source/WebCore:

No new tests, build system change.

We are currently kind of duplicating the same
FindGStreamer-Foo.cmake file whenever a new GStreamer plugin needs
to be found. Besides this approach not scaling very well, it
relies on pkg-config for version checking, uses the LibFindMacros
package that we should deprecate and all the find files could be
merged into one, with users using the COMPONENTS feature of the
FIND_PACKAGE() call to find the desired plugins.

FindGStreamer.cmake has then been rewritten to take all that into
account:
- The LibFindMacros.cmake package is not used anymore.
- Version check is performed in the CMake file itself by parsing
the gstversion.h header.
- All GStreamer plugins are searched and the COMPONENTS keyword
used in the FIND_PACKAGE() call is used to check which plugins are
required.
- The plugins-base and base GStreamer plugins are not searched, as
they were not used anywhere in the build system.

* PlatformEfl.cmake: Update GStreamer-related variable names.

Source/WebKit:

We are currently kind of duplicating the same
FindGStreamer-Foo.cmake file whenever a new GStreamer plugin needs
to be found. Besides this approach not scaling very well, it
relies on pkg-config for version checking, uses the LibFindMacros
package that we should deprecate and all the find files could be
merged into one, with users using the COMPONENTS feature of the
FIND_PACKAGE() call to find the desired plugins.

FindGStreamer.cmake has then been rewritten to take all that into
account:
- The LibFindMacros.cmake package is not used anymore.
- Version check is performed in the CMake file itself by parsing
the gstversion.h header.
- All GStreamer plugins are searched and the COMPONENTS keyword
used in the FIND_PACKAGE() call is used to check which plugins are
required.
- The plugins-base and base GStreamer plugins are not searched, as
they were not used anywhere in the build system.

* PlatformEfl.cmake: Update GStreamer-related variable names.

Modified Paths

Removed Paths

Diff

Modified: trunk/ChangeLog (116452 => 116453)


--- trunk/ChangeLog	2012-05-08 20:24:53 UTC (rev 116452)
+++ trunk/ChangeLog	2012-05-08 20:32:34 UTC (rev 116453)
@@ -1,3 +1,41 @@
+2012-05-08  Raphael Kubo da Costa  <[email protected]>
+
+        [CMake] Rewrite FindGStreamer.cmake.
+        https://bugs.webkit.org/show_bug.cgi?id=85857
+
+        Reviewed by Daniel Bates.
+
+        We are currently kind of duplicating the same
+        FindGStreamer-Foo.cmake file whenever a new GStreamer plugin needs
+        to be found. Besides this approach not scaling very well, it
+        relies on pkg-config for version checking, uses the LibFindMacros
+        package that we should deprecate and all the find files could be
+        merged into one, with users using the COMPONENTS feature of the
+        FIND_PACKAGE() call to find the desired plugins.
+
+        FindGStreamer.cmake has then been rewritten to take all that into
+        account:
+        - The LibFindMacros.cmake package is not used anymore.
+        - Version check is performed in the CMake file itself by parsing
+        the gstversion.h header.
+        - All GStreamer plugins are searched and the COMPONENTS keyword
+        used in the FIND_PACKAGE() call is used to check which plugins are
+        required.
+        - The plugins-base and base GStreamer plugins are not searched, as
+        they were not used anywhere in the build system.
+
+        * Source/cmake/FindGStreamer-App.cmake: Removed.
+        * Source/cmake/FindGStreamer-Audio.cmake: Removed.
+        * Source/cmake/FindGStreamer-Base.cmake: Removed.
+        * Source/cmake/FindGStreamer-FFT.cmake: Removed.
+        * Source/cmake/FindGStreamer-Interfaces.cmake: Removed.
+        * Source/cmake/FindGStreamer-Pbutils.cmake: Removed.
+        * Source/cmake/FindGStreamer-Plugins-Base.cmake: Removed.
+        * Source/cmake/FindGStreamer-Video.cmake: Removed.
+        * Source/cmake/FindGStreamer.cmake: Rewrite as described above.
+        * Source/cmake/OptionsEfl.cmake: Use COMPONENTS to specify which
+        GStreamer plugins to look for.
+
 2012-05-08  Ryosuke Niwa  <[email protected]>
 
         perf-o-matic fix attempt for dashboard images.

Modified: trunk/Source/WebCore/ChangeLog (116452 => 116453)


--- trunk/Source/WebCore/ChangeLog	2012-05-08 20:24:53 UTC (rev 116452)
+++ trunk/Source/WebCore/ChangeLog	2012-05-08 20:32:34 UTC (rev 116453)
@@ -1,3 +1,33 @@
+2012-05-08  Raphael Kubo da Costa  <[email protected]>
+
+        [CMake] Rewrite FindGStreamer.cmake.
+        https://bugs.webkit.org/show_bug.cgi?id=85857
+
+        Reviewed by Daniel Bates.
+
+        No new tests, build system change.
+
+        We are currently kind of duplicating the same
+        FindGStreamer-Foo.cmake file whenever a new GStreamer plugin needs
+        to be found. Besides this approach not scaling very well, it
+        relies on pkg-config for version checking, uses the LibFindMacros
+        package that we should deprecate and all the find files could be
+        merged into one, with users using the COMPONENTS feature of the
+        FIND_PACKAGE() call to find the desired plugins.
+
+        FindGStreamer.cmake has then been rewritten to take all that into
+        account:
+        - The LibFindMacros.cmake package is not used anymore.
+        - Version check is performed in the CMake file itself by parsing
+        the gstversion.h header.
+        - All GStreamer plugins are searched and the COMPONENTS keyword
+        used in the FIND_PACKAGE() call is used to check which plugins are
+        required.
+        - The plugins-base and base GStreamer plugins are not searched, as
+        they were not used anywhere in the build system.
+
+        * PlatformEfl.cmake: Update GStreamer-related variable names.
+
 2012-05-08  Mikhail Pozdnyakov  <[email protected]>
 
         [EFL] Handling of numeric-pad keys in EFL's PlatformKeyboardEvent

Modified: trunk/Source/WebCore/PlatformEfl.cmake (116452 => 116453)


--- trunk/Source/WebCore/PlatformEfl.cmake	2012-05-08 20:24:53 UTC (rev 116452)
+++ trunk/Source/WebCore/PlatformEfl.cmake	2012-05-08 20:32:34 UTC (rev 116453)
@@ -219,9 +219,9 @@
   LIST(APPEND WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/platform/graphics/gstreamer"
 
-    ${GStreamer-App_INCLUDE_DIRS}
-    ${GStreamer-Interfaces_INCLUDE_DIRS}
-    ${GStreamer-Pbutils_INCLUDE_DIRS}
+    ${GSTREAMER_APP_INCLUDE_DIRS}
+    ${GSTREAMER_INTERFACES_INCLUDE_DIRS}
+    ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
   )
   LIST(APPEND WebCore_SOURCES
     platform/graphics/gstreamer/GRefPtrGStreamer.cpp
@@ -229,15 +229,15 @@
     platform/graphics/gstreamer/GStreamerVersioning.cpp
   )
   LIST(APPEND WebCore_LIBRARIES
-    ${GStreamer-App_LIBRARIES}
-    ${GStreamer-Interfaces_LIBRARIES}
-    ${GStreamer-Pbutils_LIBRARIES}
+    ${GSTREAMER_APP_LIBRARIES}
+    ${GSTREAMER_INTERFACES_LIBRARIES}
+    ${GSTREAMER_PBUTILS_LIBRARIES}
   )
 ENDIF ()
 
 IF (ENABLE_VIDEO)
   LIST(APPEND WebCore_INCLUDE_DIRECTORIES
-    ${GStreamer-Video_INCLUDE_DIRS}
+    ${GSTREAMER_VIDEO_INCLUDE_DIRS}
   )
   LIST(APPEND WebCore_SOURCES
     platform/graphics/gstreamer/GStreamerGWorld.cpp
@@ -248,7 +248,7 @@
     platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
   )
   LIST(APPEND WebCore_LIBRARIES
-    ${GStreamer-Video_LIBRARIES}
+    ${GSTREAMER_VIDEO_LIBRARIES}
   )
 ENDIF ()
 
@@ -280,8 +280,8 @@
   LIST(APPEND WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/platform/audio/gstreamer"
 
-    ${GStreamer-Audio_INCLUDE_DIRS}
-    ${GStreamer-FFT_INCLUDE_DIRS}
+    ${GSTREAMER_AUDIO_INCLUDE_DIRS}
+    ${GSTREAMER_FFT_INCLUDE_DIRS}
   )
   LIST(APPEND WebCore_SOURCES
     platform/audio/efl/AudioBusEfl.cpp
@@ -291,8 +291,8 @@
     platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
   )
   LIST(APPEND WebCore_LIBRARIES
-    ${GStreamer-Audio_LIBRARIES}
-    ${GStreamer-FFT_LIBRARIES}
+    ${GSTREAMER_AUDIO_LIBRARIES}
+    ${GSTREAMER_FFT_LIBRARIES}
   )
   SET(WEB_AUDIO_DIR ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/webaudio/resources)
   FILE(GLOB WEB_AUDIO_DATA "${WEBCORE_DIR}/platform/audio/resources/*.wav")

Modified: trunk/Source/WebKit/ChangeLog (116452 => 116453)


--- trunk/Source/WebKit/ChangeLog	2012-05-08 20:24:53 UTC (rev 116452)
+++ trunk/Source/WebKit/ChangeLog	2012-05-08 20:32:34 UTC (rev 116453)
@@ -1,3 +1,31 @@
+2012-05-08  Raphael Kubo da Costa  <[email protected]>
+
+        [CMake] Rewrite FindGStreamer.cmake.
+        https://bugs.webkit.org/show_bug.cgi?id=85857
+
+        Reviewed by Daniel Bates.
+
+        We are currently kind of duplicating the same
+        FindGStreamer-Foo.cmake file whenever a new GStreamer plugin needs
+        to be found. Besides this approach not scaling very well, it
+        relies on pkg-config for version checking, uses the LibFindMacros
+        package that we should deprecate and all the find files could be
+        merged into one, with users using the COMPONENTS feature of the
+        FIND_PACKAGE() call to find the desired plugins.
+
+        FindGStreamer.cmake has then been rewritten to take all that into
+        account:
+        - The LibFindMacros.cmake package is not used anymore.
+        - Version check is performed in the CMake file itself by parsing
+        the gstversion.h header.
+        - All GStreamer plugins are searched and the COMPONENTS keyword
+        used in the FIND_PACKAGE() call is used to check which plugins are
+        required.
+        - The plugins-base and base GStreamer plugins are not searched, as
+        they were not used anywhere in the build system.
+
+        * PlatformEfl.cmake: Update GStreamer-related variable names.
+
 2012-05-08  Jonathan Dong  <[email protected]>
 
         [BlackBerry] AutofillManager implementation upstream

Modified: trunk/Source/WebKit/PlatformEfl.cmake (116452 => 116453)


--- trunk/Source/WebKit/PlatformEfl.cmake	2012-05-08 20:24:53 UTC (rev 116452)
+++ trunk/Source/WebKit/PlatformEfl.cmake	2012-05-08 20:32:34 UTC (rev 116453)
@@ -37,10 +37,10 @@
 IF (ENABLE_VIDEO)
 LIST(APPEND WebKit_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/platform/graphics/gstreamer"
-    ${GStreamer-App_INCLUDE_DIRS}
-    ${GStreamer-Interfaces_INCLUDE_DIRS}
-    ${GStreamer-Pbutils_INCLUDE_DIRS}
-    ${GStreamer-Video_INCLUDE_DIRS}
+    ${GSTREAMER_APP_INCLUDE_DIRS}
+    ${GSTREAMER_INTERFACES_INCLUDE_DIRS}
+    ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
+    ${GSTREAMER_VIDEO_INCLUDE_DIRS}
 )
 ENDIF()
 

Deleted: trunk/Source/cmake/FindGStreamer-App.cmake (116452 => 116453)


--- trunk/Source/cmake/FindGStreamer-App.cmake	2012-05-08 20:24:53 UTC (rev 116452)
+++ trunk/Source/cmake/FindGStreamer-App.cmake	2012-05-08 20:32:34 UTC (rev 116453)
@@ -1,34 +0,0 @@
-# - Try to find GStreamer-App
-# Once done, this will define
-#
-#  GStreamer-App_FOUND - system has GStreamer
-#  GStreamer-App_INCLUDE_DIRS - the GStreamer include directories
-#  GStreamer-App_LIBRARIES - link these to use GStreamer
-
-include(LibFindMacros)
-
-# Dependencies
-libfind_package(GStreamer-App GStreamer)
-libfind_package(GStreamer-App GStreamer-Base)
-
-# Use pkg-config to get hints about paths
-libfind_pkg_check_modules(GStreamer-App_PKGCONF gstreamer-app-0.10>=0.10.30)
-
-# Include dir
-find_path(GStreamer-App_INCLUDE_DIR
-  NAMES gst/app/gstappsink.h
-  PATHS ${GStreamer-App_PKGCONF_INCLUDE_DIRS}
-  PATH_SUFFIXES gstreamer-0.10
-)
-
-# Finally the library itself
-find_library(GStreamer-App_LIBRARY
-  NAMES gstapp-0.10
-  PATHS ${GStreamer-App_PKGCONF_LIBRARY_DIRS}
-)
-
-# Set the include dir variables and the libraries and let libfind_process do the rest.
-# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
-set(GStreamer-App_PROCESS_INCLUDES GStreamer-App_INCLUDE_DIR GStreamer_INCLUDE_DIR GStreamer-Base_INCLUDE_DIR)
-set(GStreamer-App_PROCESS_LIBS GStreamer-App_LIBRARY GStreamer_LIBRARIES GStreamer-Base_LIBRARIES)
-libfind_process(GStreamer-App)

Deleted: trunk/Source/cmake/FindGStreamer-Audio.cmake (116452 => 116453)


--- trunk/Source/cmake/FindGStreamer-Audio.cmake	2012-05-08 20:24:53 UTC (rev 116452)
+++ trunk/Source/cmake/FindGStreamer-Audio.cmake	2012-05-08 20:32:34 UTC (rev 116453)
@@ -1,35 +0,0 @@
-# - Try to find GStreamer-Audio
-# Once done, this will define
-#
-#  GStreamer-Audio_FOUND - system has GStreamer-Audio
-#  GStreamer-Audio_INCLUDE_DIRS - the GStreamer-Audio include directories
-#  GStreamer-Audio_LIBRARIES - link these to use GStreamer-Audio
-
-include(LibFindMacros)
-
-# Dependencies
-libfind_package(GStreamer-Audio GStreamer)
-libfind_package(GStreamer-Audio GStreamer-Base)
-
-# Use pkg-config to get hints about paths
-libfind_pkg_check_modules(GStreamer-Audio_PKGCONF gstreamer-audio-0.10>=0.10.30)
-
-# Include dir
-find_path(GStreamer-Audio_INCLUDE_DIR
-  NAMES gst/audio/audio.h
-  PATHS ${GStreamer-Audio_PKGCONF_INCLUDE_DIRS}
-  PATH_SUFFIXES gstreamer-0.10
-)
-
-# Finally the library itself
-find_library(GStreamer-Audio_LIBRARY
-  NAMES gstaudio-0.10
-  PATHS ${GStreamer-Audio_PKGCONF_LIBRARY_DIRS}
-)
-
-# Set the include dir variables and the libraries and let libfind_process do the rest.
-# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
-set(GStreamer-Audio_PROCESS_INCLUDES GStreamer-Audio_INCLUDE_DIR
-GStreamer_INCLUDE_DIR GStreamer-Base_INCLUDE_DIR)
-set(GStreamer-Audio_PROCESS_LIBS GStreamer-Audio_LIBRARY GStreamer_LIBRARIES GStreamer-Base_LIBRARIES)
-libfind_process(GStreamer-Audio)

Deleted: trunk/Source/cmake/FindGStreamer-Base.cmake (116452 => 116453)


--- trunk/Source/cmake/FindGStreamer-Base.cmake	2012-05-08 20:24:53 UTC (rev 116452)
+++ trunk/Source/cmake/FindGStreamer-Base.cmake	2012-05-08 20:32:34 UTC (rev 116453)
@@ -1,33 +0,0 @@
-# - Try to find GStreamer-Base
-# Once done, this will define
-#
-#  GStreamer-Base_FOUND - system has GStreamer-Base
-#  GStreamer-Base_INCLUDE_DIRS - the GStreamer-Base include directories
-#  GStreamer-Base_LIBRARIES - link these to use GStreamer-Base
-
-include(LibFindMacros)
-
-# Dependencies
-libfind_package(GStreamer-Base GStreamer)
-
-# Use pkg-config to get hints about paths
-libfind_pkg_check_modules(GStreamer-Base_PKGCONF gstreamer-base-0.10>=0.10.30)
-
-# Include dir
-find_path(GStreamer-Base_INCLUDE_DIR
-  NAMES gst/base/gstbasesrc.h
-  PATHS ${GStreamer-Base_PKGCONF_INCLUDE_DIRS}
-  PATH_SUFFIXES gstreamer-0.10
-)
-
-# Finally the library itself
-find_library(GStreamer-Base_LIBRARY
-  NAMES gstbase-0.10
-  PATHS ${GStreamer-Base_PKGCONF_LIBRARY_DIRS}
-)
-
-# Set the include dir variables and the libraries and let libfind_process do the rest.
-# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
-set(GStreamer-Base_PROCESS_INCLUDES GStreamer-Base_INCLUDE_DIR GStreamer_INCLUDE_DIR)
-set(GStreamer-Base_PROCESS_LIBS GStreamer-Base_LIBRARY GStreamer_LIBRARIES)
-libfind_process(GStreamer-Base)

Deleted: trunk/Source/cmake/FindGStreamer-FFT.cmake (116452 => 116453)


--- trunk/Source/cmake/FindGStreamer-FFT.cmake	2012-05-08 20:24:53 UTC (rev 116452)
+++ trunk/Source/cmake/FindGStreamer-FFT.cmake	2012-05-08 20:32:34 UTC (rev 116453)
@@ -1,34 +0,0 @@
-# - Try to find GStreamer-FFT
-# Once done, this will define
-#
-#  GStreamer-FFT_FOUND - system has GStreamer-FFT
-#  GStreamer-FFT_INCLUDE_DIRS - the GStreamer-FFT include directories
-#  GStreamer-FFT_LIBRARIES - link these to use GStreamer-FFT
-
-include(LibFindMacros)
-
-# Dependencies
-libfind_package(GStreamer-FFT GStreamer)
-libfind_package(GStreamer-FFT GStreamer-Base)
-
-# Use pkg-config to get hints about paths
-libfind_pkg_check_modules(GStreamer-FFT_PKGCONF gstreamer-base-0.10>=0.10.30)
-
-# Include dir
-find_path(GStreamer-FFT_INCLUDE_DIR
-  NAMES gst/fft/gstfftf32.h
-  PATHS ${GStreamer-FFT_PKGCONF_INCLUDE_DIRS}
-  PATH_SUFFIXES gstreamer-0.10
-)
-
-# Finally the library itself
-find_library(GStreamer-FFT_LIBRARY
-  NAMES gstfft-0.10
-  PATHS ${GStreamer-FFT_PKGCONF_LIBRARY_DIRS}
-)
-
-# Set the include dir variables and the libraries and let libfind_process do the rest.
-# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
-set(GStreamer-FFT_PROCESS_INCLUDES GStreamer-FFT_INCLUDE_DIR GStreamer_INCLUDE_DIR)
-set(GStreamer-FFT_PROCESS_LIBS GStreamer-FFT_LIBRARY GStreamer_LIBRARIES)
-libfind_process(GStreamer-FFT)

Deleted: trunk/Source/cmake/FindGStreamer-Interfaces.cmake (116452 => 116453)


--- trunk/Source/cmake/FindGStreamer-Interfaces.cmake	2012-05-08 20:24:53 UTC (rev 116452)
+++ trunk/Source/cmake/FindGStreamer-Interfaces.cmake	2012-05-08 20:32:34 UTC (rev 116453)
@@ -1,33 +0,0 @@
-# - Try to find GStreamer-Interfaces
-# Once done, this will define
-#
-#  GStreamer-Interfaces_FOUND - system has GStreamer-Interfaces
-#  GStreamer-Interfaces_INCLUDE_DIRS - the GStreamer-Interfaces include directories
-#  GStreamer-Interfaces_LIBRARIES - link these to use GStreamer-Interfaces
-
-include(LibFindMacros)
-
-# Dependencies
-libfind_package(GStreamer-Interfaces GStreamer)
-
-# Use pkg-config to get hints about paths
-libfind_pkg_check_modules(GStreamer-Interfaces_PKGCONF gstreamer-interfaces-0.10>=0.10.30)
-
-# Include dir
-find_path(GStreamer-Interfaces_INCLUDE_DIR
-  NAMES gst/interfaces/mixer.h
-  PATHS ${GStreamer-Interfaces_PKGCONF_INCLUDE_DIRS}
-  PATH_SUFFIXES gstreamer-0.10
-)
-
-# Finally the library itself
-find_library(GStreamer-Interfaces_LIBRARY
-  NAMES gstinterfaces-0.10
-  PATHS ${GStreamer-Interfaces_PKGCONF_LIBRARY_DIRS}
-)
-
-# Set the include dir variables and the libraries and let libfind_process do the rest.
-# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
-set(GStreamer-Interfaces_PROCESS_INCLUDES GStreamer-Interfaces_INCLUDE_DIR GStreamer_INCLUDE_DIR)
-set(GStreamer-Interfaces_PROCESS_LIBS GStreamer-Interfaces_LIBRARY GStreamer_LIBRARIES)
-libfind_process(GStreamer-Interfaces)

Deleted: trunk/Source/cmake/FindGStreamer-Pbutils.cmake (116452 => 116453)


--- trunk/Source/cmake/FindGStreamer-Pbutils.cmake	2012-05-08 20:24:53 UTC (rev 116452)
+++ trunk/Source/cmake/FindGStreamer-Pbutils.cmake	2012-05-08 20:32:34 UTC (rev 116453)
@@ -1,33 +0,0 @@
-# - Try to find GStreamer-Pbutils
-# Once done, this will define
-#
-#  GStreamer-Pbutils_FOUND - system has GStreamer-Pbutils
-#  GStreamer-Pbutils_INCLUDE_DIRS - the GStreamer-Pbutils include directories
-#  GStreamer-Pbutils_LIBRARIES - link these to use GStreamer-Pbutils
-
-include(LibFindMacros)
-
-# Dependencies
-libfind_package(GStreamer-Pbutils GStreamer)
-
-# Use pkg-config to get hints about paths
-libfind_pkg_check_modules(GStreamer-Pbutils_PKGCONF gstreamer-pbutils-0.10>=0.10.30)
-
-# Include dir
-find_path(GStreamer-Pbutils_INCLUDE_DIR
-  NAMES gst/pbutils/pbutils.h
-  PATHS ${GStreamer-Pbutils_PKGCONF_INCLUDE_DIRS}
-  PATH_SUFFIXES gstreamer-0.10
-)
-
-# Finally the library itself
-find_library(GStreamer-Pbutils_LIBRARY
-  NAMES gstpbutils-0.10
-  PATHS ${GStreamer-Pbutils_PKGCONF_LIBRARY_DIRS}
-)
-
-# Set the include dir variables and the libraries and let libfind_process do the rest.
-# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
-set(GStreamer-Pbutils_PROCESS_INCLUDES GStreamer-Pbutils_INCLUDE_DIR GStreamer_INCLUDE_DIR)
-set(GStreamer-Pbutils_PROCESS_LIBS GStreamer-Pbutils_LIBRARY GStreamer_LIBRARY)
-libfind_process(GStreamer-Pbutils)

Deleted: trunk/Source/cmake/FindGStreamer-Plugins-Base.cmake (116452 => 116453)


--- trunk/Source/cmake/FindGStreamer-Plugins-Base.cmake	2012-05-08 20:24:53 UTC (rev 116452)
+++ trunk/Source/cmake/FindGStreamer-Plugins-Base.cmake	2012-05-08 20:32:34 UTC (rev 116453)
@@ -1,33 +0,0 @@
-# - Try to find GStreamer-Plugins-Base
-# Once done, this will define
-#
-#  GStreamer-Plugins-Base_FOUND - system has GStreamer-Plugins-Base
-#  GStreamer-Plugins-Base_INCLUDE_DIRS - the GStreamer-Plugins-Base include directories
-#  GStreamer-Plugins-Base_LIBRARIES - link these to use GStreamer-Plugins-Base
-
-include(LibFindMacros)
-
-# Dependencies
-libfind_package(GStreamer-Plugins-Base GStreamer)
-
-# Use pkg-config to get hints about paths
-libfind_pkg_check_modules(GStreamer-Plugins-Base_PKGCONF gstreamer-plugins-base-0.10>=0.10.30)
-
-# Include dir
-find_path(GStreamer-Plugins-Base_INCLUDE_DIR
-  NAMES gst/audio/audio.h
-  PATHS ${GStreamer-Plugins-Base_PKGCONF_INCLUDE_DIRS}
-  PATH_SUFFIXES gstreamer-0.10
-)
-
-# Finally the library itself
-find_library(GStreamer-Plugins-Base_LIBRARY
-  NAMES gstreamer-0.10
-  PATHS ${GStreamer-Plugins-Base_PKGCONF_LIBRARY_DIRS}
-)
-
-# Set the include dir variables and the libraries and let libfind_process do the rest.
-# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
-set(GStreamer-Plugins-Base_PROCESS_INCLUDES GStreamer-Plugins-Base_INCLUDE_DIR GStreamer_INCLUDE_DIR)
-set(GStreamer-Plugins-Base_PROCESS_LIBS GStreamer-Plugins-Base_LIBRARY GStreamer_LIBRARIES)
-libfind_process(GStreamer-Plugins-Base)

Deleted: trunk/Source/cmake/FindGStreamer-Video.cmake (116452 => 116453)


--- trunk/Source/cmake/FindGStreamer-Video.cmake	2012-05-08 20:24:53 UTC (rev 116452)
+++ trunk/Source/cmake/FindGStreamer-Video.cmake	2012-05-08 20:32:34 UTC (rev 116453)
@@ -1,34 +0,0 @@
-# - Try to find GStreamer-Video
-# Once done, this will define
-#
-#  GStreamer-Video_FOUND - system has GStreamer-Video
-#  GStreamer-Video_INCLUDE_DIRS - the GStreamer-Video include directories
-#  GStreamer-Video_LIBRARIES - link these to use GStreamer-Video
-
-include(LibFindMacros)
-
-# Dependencies
-libfind_package(GStreamer-Video GStreamer)
-libfind_package(GStreamer-Video GStreamer-Base)
-
-# Use pkg-config to get hints about paths
-libfind_pkg_check_modules(GStreamer-Video_PKGCONF gstreamer-video-0.10>=0.10.30)
-
-# Include dir
-find_path(GStreamer-Video_INCLUDE_DIR
-  NAMES gst/video/video.h
-  PATHS ${GStreamer-Video_PKGCONF_INCLUDE_DIRS}
-  PATH_SUFFIXES gstreamer-0.10
-)
-
-# Finally the library itself
-find_library(GStreamer-Video_LIBRARY
-  NAMES gstvideo-0.10
-  PATHS ${GStreamer-Video_PKGCONF_LIBRARY_DIRS}
-)
-
-# Set the include dir variables and the libraries and let libfind_process do the rest.
-# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
-set(GStreamer-Video_PROCESS_INCLUDES GStreamer-Video_INCLUDE_DIR GStreamer_INCLUDE_DIR GStreamer-Base_INCLUDE_DIR)
-set(GStreamer-Video_PROCESS_LIBS GStreamer-Video_LIBRARY GStreamer_LIBRARIES GStreamer-Base_LIBRARIES)
-libfind_process(GStreamer-Video)

Modified: trunk/Source/cmake/FindGStreamer.cmake (116452 => 116453)


--- trunk/Source/cmake/FindGStreamer.cmake	2012-05-08 20:24:53 UTC (rev 116452)
+++ trunk/Source/cmake/FindGStreamer.cmake	2012-05-08 20:32:34 UTC (rev 116453)
@@ -1,31 +1,125 @@
-# - Try to find GStreamer
+# - Try to find GStreamer and its plugins
 # Once done, this will define
 #
-#  GStreamer_FOUND - system has GStreamer
-#  GStreamer_INCLUDE_DIRS - the GStreamer include directories
-#  GStreamer_LIBRARIES - link these to use GStreamer
+#  GSTREAMER_FOUND - system has GStreamer
+#  GSTREAMER_INCLUDE_DIRS - the GStreamer include directories
+#  GSTREAMER_LIBRARIES - link these to use GStreamer
+#
+# Optionally, the COMPONENTS keyword can be passed to FIND_PACKAGE()
+# and GStreamer plugins can be looked for.  Currently, the following
+# plugins can be searched, and they define the following variables if
+# found:
+#
+#  gstreamer-app:        GSTREAMER_APP_INCLUDE_DIRS and GSTREAMER_APP_LIBRARIES
+#  gstreamer-audio:      GSTREAMER_AUDIO_INCLUDE_DIRS and GSTREAMER_AUDIO_LIBRARIES
+#  gstreamer-fft:        GSTREAMER_FFT_INCLUDE_DIRS and GSTREAMER_FFT_LIBRARIES
+#  gstreamer-interfaces: GSTREAMER_INTERFACES_INCLUDE_DIRS and GSTREAMER_INTERFACES_LIBRARIES
+#  gstreamer-pbutils:    GSTREAMER_PBUTILS_INCLUDE_DIRS and GSTREAMER_PBUTILS_LIBRARIES
+#  gstreamer-video:      GSTREAMER_VIDEO_INCLUDE_DIRS and GSTREAMER_VIDEO_LIBRARIES
+#
+# Copyright (C) 2012 Raphael Kubo da Costa <[email protected]>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-include(LibFindMacros)
+FIND_PACKAGE(PkgConfig)
 
-# Use pkg-config to get hints about paths
-libfind_pkg_check_modules(GStreamer_PKGCONF gstreamer-0.10>=0.10.30)
+# The minimum GStreamer version we support.
+SET(GSTREAMER_MINIMUM_VERSION 0.10.30)
 
-# Include dir
-find_path(GStreamer_INCLUDE_DIR
-  NAMES gst/gst.h
-  PATHS ${GStreamer_PKGCONF_INCLUDE_DIRS}
-  PATH_SUFFIXES gstreamer-0.10
-)
+# Helper macro to find a GStreamer plugin (or GStreamer itself)
+#   _component_prefix is prepended to the _INCLUDE_DIRS and _LIBRARIES variables (eg. "GSTREAMER_AUDIO")
+#   _pkgconfig_name is the component's pkg-config name (eg. "gstreamer-0.10", or "gstreamer-video-0.10").
+#   _header is the component's header, relative to the gstreamer-0.10 directory (eg. "gst/gst.h").
+#   _library is the component's library name (eg. "gstreamer-0.10" or "gstvideo-0.10")
+MACRO(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
+    # FIXME: The QUIET keyword can be used once we require CMake 2.8.2.
+    PKG_CHECK_MODULES(PC_${_component_prefix} ${_pkgconfig_name})
 
-# Finally the library itself
-find_library(GStreamer_LIBRARY
-  NAMES gstreamer-0.10
-  PATHS ${GStreamer_PKGCONF_LIBRARY_DIRS}
-)
+    FIND_PATH(${_component_prefix}_INCLUDE_DIRS
+        NAMES ${_header}
+        HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}
+        PATH_SUFFIXES gstreamer-0.10
+    )
 
-# Set the include dir variables and the libraries and let libfind_process do the rest.
-# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
-set(GStreamer_PROCESS_INCLUDES GStreamer_INCLUDE_DIR)
-set(GStreamer_PROCESS_LIBS GStreamer_LIBRARY)
-libfind_process(GStreamer)
+    FIND_LIBRARY(${_component_prefix}_LIBRARIES
+        NAMES ${_library}
+        HINTS ${PC_${_component_prefix}_LIBRARY_DIRS} ${PC_${_component_prefix}_LIBDIR}
+    )
+ENDMACRO()
 
+# ------------------------
+# 1. Find GStreamer itself
+# ------------------------
+
+# 1.1. Find headers and libraries
+FIND_GSTREAMER_COMPONENT(GSTREAMER gstreamer-0.10 gst/gst.h gstreamer-0.10)
+
+# 1.2. Check GStreamer version
+IF (GSTREAMER_INCLUDE_DIRS)
+    IF (EXISTS "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h")
+        FILE (READ "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h" GSTREAMER_VERSION_CONTENTS)
+
+        STRING(REGEX MATCH "#define +GST_VERSION_MAJOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
+        SET(GSTREAMER_VERSION_MAJOR "${CMAKE_MATCH_1}")
+
+        STRING(REGEX MATCH "#define +GST_VERSION_MINOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
+        SET(GSTREAMER_VERSION_MINOR "${CMAKE_MATCH_1}")
+
+        STRING(REGEX MATCH "#define +GST_VERSION_MICRO +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
+        SET(GSTREAMER_VERSION_MICRO "${CMAKE_MATCH_1}")
+
+        SET(GSTREAMER_VERSION "${GSTREAMER_VERSION_MAJOR}.${GSTREAMER_VERSION_MINOR}.${GSTREAMER_VERSION_MICRO}")
+    ENDIF ()
+ENDIF ()
+
+# FIXME: With CMake 2.8.3 we can just pass GSTREAMER_VERSION to FIND_PACKAGE_HANDLE_STARNDARD_ARGS as VERSION_VAR
+#        and remove the version check here (GSTREAMER_MINIMUM_VERSION would be passed to FIND_PACKAGE).
+SET(VERSION_OK TRUE)
+IF ("${GSTREAMER_VERSION}" VERSION_LESS "${GSTREAMER_MINIMUM_VERSION}")
+    SET(VERSION_OK FALSE)
+ENDIF ()
+
+# -------------------------
+# 2. Find GStreamer plugins
+# -------------------------
+
+FIND_GSTREAMER_COMPONENT(GSTREAMER_APP gstreamer-app-0.10 gst/app/gstappsink.h gstapp-0.10)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_AUDIO gstreamer-audio-0.10 gst/audio/audio.h gstaudio-0.10)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_FFT gstreamer-fft-0.10 gst/fft/gstfft.h gstfft-0.10)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_INTERFACES gstreamer-interfaces-0.10 gst/interfaces/mixer.h gstinterfaces-0.10)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_PBUTILS gstreamer-pbutils-0.10 gst/pbutils/pbutils.h gstpbutils-0.10)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_VIDEO gstreamer-video-0.10 gst/video/video.h gstvideo-0.10)
+
+# ------------------------------------------------
+# 3. Process the COMPONENTS passed to FIND_PACKAGE
+# ------------------------------------------------
+SET(_GSTREAMER_REQUIRED_VARS GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES VERSION_OK)
+
+FOREACH(_component ${GStreamer_FIND_COMPONENTS})
+    SET(_gst_component "GSTREAMER_${_component}")
+    STRING(TOUPPER ${_gst_component} _UPPER_NAME)
+
+    LIST(APPEND _GSTREAMER_REQUIRED_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
+ENDFOREACH()
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GStreamer DEFAULT_MSG ${_GSTREAMER_REQUIRED_VARS})

Modified: trunk/Source/cmake/OptionsEfl.cmake (116452 => 116453)


--- trunk/Source/cmake/OptionsEfl.cmake	2012-05-08 20:24:53 UTC (rev 116452)
+++ trunk/Source/cmake/OptionsEfl.cmake	2012-05-08 20:32:34 UTC (rev 116453)
@@ -109,24 +109,20 @@
 ENDIF ()
 
 IF (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
-  FIND_PACKAGE(GStreamer REQUIRED)
-  FIND_PACKAGE(GStreamer-App REQUIRED)
-  FIND_PACKAGE(GStreamer-Base REQUIRED)
-  FIND_PACKAGE(GStreamer-Interfaces REQUIRED)
-  FIND_PACKAGE(GStreamer-Pbutils REQUIRED)
-  FIND_PACKAGE(GStreamer-Plugins-Base REQUIRED)
-  SET(WTF_USE_GSTREAMER 1)
-  ADD_DEFINITIONS(-DWTF_USE_GSTREAMER=1)
-ENDIF ()
+    SET(GSTREAMER_COMPONENTS app interfaces pbutils)
+    SET(WTF_USE_GSTREAMER 1)
+    ADD_DEFINITIONS(-DWTF_USE_GSTREAMER=1)
 
-IF (ENABLE_VIDEO)
-  FIND_PACKAGE(GStreamer-Video REQUIRED)
-ENDIF()
+    IF (ENABLE_VIDEO)
+        LIST(APPEND GSTREAMER_COMPONENTS video)
+    ENDIF()
 
-IF (ENABLE_WEB_AUDIO)
-  FIND_PACKAGE(GStreamer-Audio REQUIRED)
-  FIND_PACKAGE(GStreamer-FFT REQUIRED)
-  ADD_DEFINITIONS(-DWTF_USE_WEBAUDIO_GSTREAMER=1)
+    IF (ENABLE_WEB_AUDIO)
+        LIST(APPEND GSTREAMER_COMPONENTS audio fft)
+        ADD_DEFINITIONS(-DWTF_USE_WEBAUDIO_GSTREAMER=1)
+    ENDIF ()
+
+    FIND_PACKAGE(GStreamer REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
 ENDIF ()
 
 IF (ENABLE_WEBGL)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to