[CMake] Error when gst-plugins-base is missing is too confusing
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Jun 2015 07:17:52 +0000 (07:17 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Jun 2015 07:17:52 +0000 (07:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=145682

Reviewed by Carlos Garcia Campos.

* Source/cmake/OptionsGTK.cmake: Error out if the required
GStreamer libraries are not found on the host.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186110 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/cmake/OptionsGTK.cmake

index 4a7e06d..e60d803 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2015-06-30  Philippe Normand  <pnormand@igalia.com>
+
+        [CMake] Error when gst-plugins-base is missing is too confusing
+        https://bugs.webkit.org/show_bug.cgi?id=145682
+
+        Reviewed by Carlos Garcia Campos.
+
+        * Source/cmake/OptionsGTK.cmake: Error out if the required
+        GStreamer libraries are not found on the host.
+
 2015-06-28  Philip Chimento  <philip.chimento@gmail.com>
 
         CairoGL should be checked unconditionally
index 40fbc05..f2c87c4 100644 (file)
@@ -354,18 +354,31 @@ endif ()
 
 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
     set(GSTREAMER_COMPONENTS app pbutils)
-    SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER TRUE)
+
     if (ENABLE_VIDEO)
         list(APPEND GSTREAMER_COMPONENTS video mpegts tag gl)
     endif ()
 
     if (ENABLE_WEB_AUDIO)
         list(APPEND GSTREAMER_COMPONENTS audio fft)
-        SET_AND_EXPOSE_TO_BUILD(USE_WEBAUDIO_GSTREAMER TRUE)
     endif ()
 
     find_package(GStreamer 1.0.3 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
 
+    if (ENABLE_WEB_AUDIO)
+        if (NOT PC_GSTREAMER_AUDIO_FOUND OR NOT PC_GSTREAMER_FFT_FOUND)
+            message(FATAL_ERROR "WebAudio requires the audio and fft GStreamer libraries. Please check your gst-plugins-base installation.")
+        else ()
+            SET_AND_EXPOSE_TO_BUILD(USE_WEBAUDIO_GSTREAMER TRUE)
+        endif ()
+    endif ()
+
+    if (ENABLE_VIDEO)
+        if (NOT PC_GSTREAMER_APP_FOUND OR NOT PC_GSTREAMER_PBUTILS_FOUND OR NOT PC_GSTREAMER_TAG_FOUND OR NOT PC_GSTREAMER_VIDEO_FOUND)
+            message(FATAL_ERROR "Video playback requires the following GStreamer libraries: app, pbutils, tag, video. Please check your gst-plugins-base installation.")
+        endif ()
+    endif ()
+
     if (USE_GSTREAMER_MPEGTS)
         if (NOT PC_GSTREAMER_MPEGTS_FOUND)
             message(FATAL_ERROR "GStreamer MPEG-TS is needed for USE_GSTREAMER_MPEGTS.")
@@ -377,6 +390,8 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
             message(FATAL_ERROR "GStreamerGL is needed for USE_GSTREAMER_GL.")
         endif ()
     endif ()
+
+    SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER TRUE)
 endif ()
 
 if (ENABLE_X11_TARGET)