Changeset 185788 in webkit


Ignore:
Timestamp:
Jun 19, 2015 7:41:09 PM (9 years ago)
Author:
Michael Catanzaro
Message:

[CMake] FindGTK3.cmake should not modify the values of build options
https://bugs.webkit.org/show_bug.cgi?id=144613

Reviewed by Martin Robinson.

  • Source/cmake/FindGTK3.cmake: Do not check or set the value of ENABLE_X11_TARGET and

ENABLE_WAYLAND_TARGET. Instead, simply define the variables GTK3_SUPPORTS_X11 and
GTK3_SUPPORTS_WAYLAND as appropriate. Also, rename GTK_SUPPORTS_GESTURES to
GTK3_SUPPORTS_GESTURES for consistency.

  • Source/cmake/OptionsGTK.cmake: Fail the build if the appropriate GTK+ backend is not

available. It's not possible to automatically select a backend correctly anymore, since all
options are set at the same time.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r185744 r185788  
     12015-06-19  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        [CMake] FindGTK3.cmake should not modify the values of build options
     4        https://bugs.webkit.org/show_bug.cgi?id=144613
     5
     6        Reviewed by Martin Robinson.
     7
     8        * Source/cmake/FindGTK3.cmake: Do not check or set the value of ENABLE_X11_TARGET and
     9        ENABLE_WAYLAND_TARGET. Instead, simply define the variables GTK3_SUPPORTS_X11 and
     10        GTK3_SUPPORTS_WAYLAND as appropriate. Also, rename GTK_SUPPORTS_GESTURES to
     11        GTK3_SUPPORTS_GESTURES for consistency.
     12        * Source/cmake/OptionsGTK.cmake: Fail the build if the appropriate GTK+ backend is not
     13        available. It's not possible to automatically select a backend correctly anymore, since all
     14        options are set at the same time.
     15
    1162015-06-19  Csaba Osztrogonác  <ossy@webkit.org>
    217
  • trunk/Source/cmake/FindGTK3.cmake

    r174880 r185788  
    55#  GTK3_INCLUDE_DIRS - the GTK+ 3. include directories
    66#  GTK3_LIBRARIES - link these to use GTK+ 3.
     7#  GTK3_SUPPORTS_GESTURES - GTK+ supports gestures (GTK+ >= 3.14)
     8#  GTK3_SUPPORTS_X11 - GTK+ supports X11 backend
     9#  GTK3_SUPPORTS_WAYLAND - GTK+ supports Wayland backend
    710#
    811# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
    9 # Copyright (C) 2013 Igalia S.L.
     12# Copyright (C) 2013, 2015 Igalia S.L.
    1013#
    1114# Redistribution and use in source and binary forms, with or without
     
    4649endif ()
    4750
    48 if (GTK3_VERSION AND VERSION_OK AND ENABLE_X11_TARGET)
     51if (GTK3_VERSION AND VERSION_OK)
    4952    pkg_check_modules(GTK3_X11 gtk+-x11-3.0)
    50     if (NOT("${GTK3_X11_VERSION}" VERSION_EQUAL "${GTK3_VERSION}"))
    51         set(ENABLE_X11_TARGET OFF)
     53    if ("${GTK3_X11_VERSION}" VERSION_EQUAL "${GTK3_VERSION}")
     54        set(GTK3_SUPPORTS_X11 TRUE)
    5255    endif ()
    53 endif ()
    5456
    55 if (GTK3_VERSION AND VERSION_OK AND ENABLE_WAYLAND_TARGET)
    5657    pkg_check_modules(GTK3_WAYLAND gtk+-wayland-3.0)
    57     if (NOT("${GTK3_WAYLAND_VERSION}" VERSION_EQUAL "${GTK3_VERSION}"))
    58         set(ENABLE_WAYLAND_TARGET OFF)
     58    if ("${GTK3_WAYLAND_VERSION}" VERSION_EQUAL "${GTK3_VERSION}")
     59        set(GTK3_SUPPORTS_WAYLAND TRUE)
    5960    endif ()
    60 endif ()
    6161
    62 if (NOT(ENABLE_X11_TARGET OR ENABLE_WAYLAND_TARGET))
    63     message(FATAL_ERROR "At least one of the following windowing targets must "
    64         "be enabled and also supported by the GTK+ dependency: X11, Wayland")
    65 endif ()
    66 
    67 if (GTK3_VERSION AND VERSION_OK AND NOT("${GTK3_VERSION}" VERSION_LESS "3.14.0"))
    68     set(GTK_SUPPORTS_GESTURES ON)
    69 else ()
    70     set(GTK_SUPPORTS_GESTURES OFF)
     62    if (NOT("${GTK3_VERSION}" VERSION_LESS "3.14.0"))
     63        set(GTK3_SUPPORTS_GESTURES ON)
     64    else ()
     65        set(GTK3_SUPPORTS_GESTURES OFF)
     66    endif ()
    7167endif ()
    7268
  • trunk/Source/cmake/OptionsGTK.cmake

    r185620 r185788  
    238238set(GDK_INCLUDE_DIRS ${GDK3_INCLUDE_DIRS})
    239239
     240SET_AND_EXPOSE_TO_BUILD(HAVE_GTK_GESTURES ${GTK3_SUPPORTS_GESTURES})
    240241SET_AND_EXPOSE_TO_BUILD(HAVE_GTK_UNIX_PRINTING ${GTK_UNIX_PRINT_FOUND})
    241 SET_AND_EXPOSE_TO_BUILD(HAVE_GTK_GESTURES ${GTK_SUPPORTS_GESTURES})
    242242
    243243set(glib_components gio gobject gthread gmodule)
     
    379379
    380380if (ENABLE_X11_TARGET)
     381    if (NOT GTK3_SUPPORTS_X11)
     382        message(FATAL_ERROR "Recompile GTK+ with X11 backend to use ENABLE_X11_TARGET")
     383    endif ()
     384
    381385    find_package(X11 REQUIRED)
    382386    if (NOT X11_Xcomposite_FOUND)
     
    392396
    393397if (ENABLE_WAYLAND_TARGET)
     398    if (NOT GTK3_SUPPORTS_WAYLAND)
     399        message(FATAL_ERROR "Recompile GTK+ with Wayland backend to use ENABLE_WAYLAND_TARGET")
     400    endif ()
     401
    394402    find_package(Wayland REQUIRED)
    395403endif ()
Note: See TracChangeset for help on using the changeset viewer.