Changeset 221006 in webkit


Ignore:
Timestamp:
Aug 22, 2017 1:44:36 AM (7 years ago)
Author:
calvaris@igalia.com
Message:

[GStreamer][GTK][WPE] Move common things to GStreamer cmake files
https://bugs.webkit.org/show_bug.cgi?id=175625

Three files were created as kind of hooks for the GTK and WPE
CMake option files. The definitions one is to enable, disable and
create the common options (that can be and are actually overriden
in some cases. The dependencies one adds dependencies for the
option switches that are set. The checks one ensure the
dependencies are met depending on the option switches.

Reviewed by Žan Doberšek.

  • Source/cmake/GStreamerChecks.cmake: Added.
  • Source/cmake/GStreamerDefinitions.cmake: Added.
  • Source/cmake/GStreamerDependencies.cmake: Added.
  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r220870 r221006  
     12017-08-22  Xabier Rodriguez Calvar  <calvaris@igalia.com>
     2
     3        [GStreamer][GTK][WPE] Move common things to GStreamer cmake files
     4        https://bugs.webkit.org/show_bug.cgi?id=175625
     5
     6        Three files were created as kind of hooks for the GTK and WPE
     7        CMake option files. The definitions one is to enable, disable and
     8        create the common options (that can be and are actually overriden
     9        in some cases. The dependencies one adds dependencies for the
     10        option switches that are set. The checks one ensure the
     11        dependencies are met depending on the option switches.
     12
     13        Reviewed by Žan Doberšek.
     14
     15        * Source/cmake/GStreamerChecks.cmake: Added.
     16        * Source/cmake/GStreamerDefinitions.cmake: Added.
     17        * Source/cmake/GStreamerDependencies.cmake: Added.
     18        * Source/cmake/OptionsGTK.cmake:
     19        * Source/cmake/OptionsWPE.cmake:
     20
    1212017-08-17  Andreas Kling  <akling@apple.com>
    222
  • trunk/Source/cmake/OptionsGTK.cmake

    r220870 r221006  
    5555WEBKIT_OPTION_BEGIN()
    5656
     57include(GStreamerDefinitions)
     58
    5759set(USE_CAIRO ON)
    5860set(USE_WOFF2 ON)
     
    9597# Private options specific to the GTK+ port. Changing these options is
    9698# completely unsupported. They are intended for use only by WebKit developers.
    97 WEBKIT_OPTION_DEFINE(USE_GSTREAMER_GL "Whether to enable support for GStreamer GL" PRIVATE ON)
    98 WEBKIT_OPTION_DEFINE(USE_GSTREAMER_MPEGTS "Whether to enable support for MPEG-TS" PRIVATE OFF)
    9999WEBKIT_OPTION_DEFINE(USE_REDIRECTED_XCOMPOSITE_WINDOW "Whether to use a Redirected XComposite Window for accelerated compositing in X11." PRIVATE ON)
    100100
     
    110110WEBKIT_OPTION_DEPEND(USE_REDIRECTED_XCOMPOSITE_WINDOW ENABLE_OPENGL)
    111111WEBKIT_OPTION_DEPEND(USE_REDIRECTED_XCOMPOSITE_WINDOW ENABLE_X11_TARGET)
    112 WEBKIT_OPTION_DEPEND(USE_GSTREAMER_GL ENABLE_OPENGL)
    113 WEBKIT_OPTION_DEPEND(USE_GSTREAMER_GL ENABLE_VIDEO)
    114 WEBKIT_OPTION_DEPEND(USE_GSTREAMER_MPEGTS ENABLE_VIDEO)
    115112
    116113SET_AND_EXPOSE_TO_BUILD(ENABLE_DEVELOPER_MODE ${DEVELOPER_MODE})
     
    145142WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SPELLCHECK PUBLIC ON)
    146143WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TOUCH_EVENTS PUBLIC ON)
    147 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO PUBLIC ON)
    148 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_AUDIO PUBLIC ON)
    149144WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBDRIVER PUBLIC ON)
    150145WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_SYSTEM_MALLOC PUBLIC OFF)
     
    172167WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_USER_MESSAGE_HANDLERS PRIVATE ON)
    173168WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SUBTLE_CRYPTO PRIVATE ON)
    174 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO_TRACK PRIVATE ON)
    175169WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL PRIVATE ON)
     170
     171include(GStreamerDefinitions)
    176172
    177173# Finalize the value for all options. Do not attempt to use an option before
     
    324320        message(FATAL_ERROR "Enchant is needed for ENABLE_SPELLCHECK")
    325321    endif ()
    326 endif ()
    327 
    328 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
    329     set(GSTREAMER_COMPONENTS app pbutils)
    330 
    331     if (ENABLE_VIDEO)
    332         list(APPEND GSTREAMER_COMPONENTS video mpegts tag gl)
    333     endif ()
    334 
    335     if (ENABLE_WEB_AUDIO)
    336         list(APPEND GSTREAMER_COMPONENTS audio fft)
    337     endif ()
    338 
    339     find_package(GStreamer 1.2.3 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
    340 
    341     if (ENABLE_WEB_AUDIO)
    342         if (NOT PC_GSTREAMER_AUDIO_FOUND OR NOT PC_GSTREAMER_FFT_FOUND)
    343             message(FATAL_ERROR "WebAudio requires the audio and fft GStreamer libraries. Please check your gst-plugins-base installation.")
    344         else ()
    345             SET_AND_EXPOSE_TO_BUILD(USE_WEBAUDIO_GSTREAMER TRUE)
    346         endif ()
    347     endif ()
    348 
    349     if (ENABLE_VIDEO)
    350         if (NOT PC_GSTREAMER_APP_FOUND OR NOT PC_GSTREAMER_PBUTILS_FOUND OR NOT PC_GSTREAMER_TAG_FOUND OR NOT PC_GSTREAMER_VIDEO_FOUND)
    351             message(FATAL_ERROR "Video playback requires the following GStreamer libraries: app, pbutils, tag, video. Please check your gst-plugins-base installation.")
    352         endif ()
    353     endif ()
    354 
    355     if (USE_GSTREAMER_MPEGTS)
    356         if (NOT PC_GSTREAMER_MPEGTS_FOUND)
    357             message(FATAL_ERROR "GStreamer MPEG-TS is needed for USE_GSTREAMER_MPEGTS.")
    358         endif ()
    359     endif ()
    360 
    361     if (USE_GSTREAMER_GL)
    362         if (PC_GSTREAMER_VERSION VERSION_LESS "1.10")
    363             set(USE_GSTREAMER_GL OFF)
    364             message(STATUS "Disabling GSTREAMER_GL as the GStreamer version is older than 1.10.")
    365         else ()
    366             if (NOT PC_GSTREAMER_GL_FOUND)
    367                 message(FATAL_ERROR "GStreamerGL is needed for USE_GSTREAMER_GL.")
    368             endif ()
    369         endif ()
    370     endif ()
    371 
    372     SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER TRUE)
    373322endif ()
    374323
     
    475424    endif ()
    476425endmacro()
     426
     427include(GStreamerChecks)
  • trunk/Source/cmake/OptionsWPE.cmake

    r220870 r221006  
    88
    99WEBKIT_OPTION_BEGIN()
     10
     11include(GStreamerDefinitions)
    1012
    1113# WebKit2 C API
     
    3133WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TOUCH_EVENTS PUBLIC ON)
    3234WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_USER_MESSAGE_HANDLERS PRIVATE ON)
    33 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO PUBLIC ON)
    34 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO_TRACK PUBLIC ON)
    3535WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_ANIMATIONS PRIVATE ON)
    36 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_AUDIO PUBLIC ON)
    3736WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL PUBLIC ON)
    3837
     
    4342endif ()
    4443
    45 WEBKIT_OPTION_DEFINE(USE_GSTREAMER_GL "Whether to enable support for GStreamer GL" PRIVATE OFF)
     44include(GStreamerDependencies)
    4645
    4746WEBKIT_OPTION_END()
     
    8382set(USE_XDGMIME ON)
    8483SET_AND_EXPOSE_TO_BUILD(USE_GCRYPT TRUE)
    85 
    86 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
    87     set(GSTREAMER_COMPONENTS app audio pbutils)
    88     SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER TRUE)
    89     if (ENABLE_VIDEO)
    90         list(APPEND GSTREAMER_COMPONENTS video tag)
    91     endif ()
    92 
    93     if (ENABLE_WEB_AUDIO)
    94         list(APPEND GSTREAMER_COMPONENTS fft)
    95         SET_AND_EXPOSE_TO_BUILD(USE_WEBAUDIO_GSTREAMER TRUE)
    96     endif ()
    97 
    98     find_package(GStreamer 1.2.3 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
    99 
    100     # FIXME: What about MPEGTS support? USE_GSTREAMER_MPEGTS?
    101 endif ()
    10284
    10385if (ENABLE_MEDIA_STREAM OR ENABLE_WEB_RTC)
     
    154136    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fvisibility=hidden -fvisibility-inlines-hidden")
    155137endif ()
     138
     139include(GStreamerChecks)
Note: See TracChangeset for help on using the changeset viewer.