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

Changeset 259641 in webkit


Ignore:
Timestamp:
Apr 7, 2020, 9:25:17 AM (6 years ago)
Author:
Adrian Perez de Castro
Message:

[GTK] CMake find module for GTK4
https://bugs.webkit.org/show_bug.cgi?id=210110

Reviewed by Don Olmstead.

.:

Rename FindGTK3.cmake as FindGTK.cmake, make it provide a GTK::GTK imported target,
and rewrite the logic to detect which targets (backends) have been built into GTK
to use the "targets" pkg-config variable instead of checking for multiple pkg-config
modules.

  • Source/cmake/FindGDK3.cmake: Removed.
  • Source/cmake/FindGTK.cmake: Added.
  • Source/cmake/FindGTK3.cmake: Removed. This is now unused because the GTK::GTK target

will transitively depend on GDK3 when using GTK3 and bring in the compiler and linker
options automatically without needing to use a separate find module for GDK.

  • Source/cmake/OptionsGTK.cmake: Use the GTK::GTK imported target, change variables

prefixed with GTK3_ to use the GTK_ prefix, and remove variables which are not needed
anymore when using the target (GTK_LIBRARIES, GTK_INCLUDE_DIRS, GDK_LIBRARIES and
GDK_INCLUDE_DIRS).

Source/WebCore:

No new tests needed.

  • PlatformGTK.cmake: Use the GTK::GTK imported target.

Source/WebCore/PAL:

  • pal/PlatformGTK.cmake: Use the GTK::GTK imported target.

Tools:

  • MiniBrowser/gtk/CMakeLists.txt: Use the GTK::GTK imported target.
  • TestWebKitAPI/PlatformGTK.cmake: Ditto.
  • TestWebKitAPI/glib/PlatformGTK.cmake: Ditto.
  • WebKitTestRunner/PlatformGTK.cmake: Ditto.
Location:
trunk
Files:
1 added
2 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r259617 r259641  
     12020-04-07  Adrian Perez de Castro  <aperez@igalia.com>
     2
     3        [GTK] CMake find module for GTK4
     4        https://bugs.webkit.org/show_bug.cgi?id=210110
     5
     6        Reviewed by Don Olmstead.
     7
     8        Rename FindGTK3.cmake as FindGTK.cmake, make it provide a GTK::GTK imported target,
     9        and rewrite the logic to detect which targets (backends) have been built into GTK
     10        to use the "targets" pkg-config variable instead of checking for multiple pkg-config
     11        modules.
     12
     13        * Source/cmake/FindGDK3.cmake: Removed.
     14        * Source/cmake/FindGTK.cmake: Added.
     15        * Source/cmake/FindGTK3.cmake: Removed. This is now unused because the GTK::GTK target
     16        will transitively depend on GDK3 when using GTK3 and bring in the compiler and linker
     17        options automatically without needing to use a separate find module for GDK.
     18        * Source/cmake/OptionsGTK.cmake: Use the GTK::GTK imported target, change variables
     19        prefixed with GTK3_ to use the GTK_ prefix, and remove variables which are not needed
     20        anymore when using the target (GTK_LIBRARIES, GTK_INCLUDE_DIRS, GDK_LIBRARIES and
     21        GDK_INCLUDE_DIRS).
     22
    1232020-04-06  Don Olmstead  <don.olmstead@sony.com>
    224
  • trunk/Source/WebCore/ChangeLog

    r259633 r259641  
     12020-04-07  Adrian Perez de Castro  <aperez@igalia.com>
     2
     3        [GTK] CMake find module for GTK4
     4        https://bugs.webkit.org/show_bug.cgi?id=210110
     5
     6        Reviewed by Don Olmstead.
     7
     8        No new tests needed.
     9
     10        * PlatformGTK.cmake: Use the GTK::GTK imported target.
     11
    1122020-04-07  Andres Gonzalez  <andresg_22@apple.com>
    213
  • trunk/Source/WebCore/PAL/ChangeLog

    r259561 r259641  
     12020-04-07  Adrian Perez de Castro  <aperez@igalia.com>
     2
     3        [GTK] CMake find module for GTK4
     4        https://bugs.webkit.org/show_bug.cgi?id=210110
     5
     6        Reviewed by Don Olmstead.
     7
     8        * pal/PlatformGTK.cmake: Use the GTK::GTK imported target.
     9
    1102020-04-05  Peng Liu  <peng.liu6@apple.com>
    211
  • trunk/Source/WebCore/PAL/pal/PlatformGTK.cmake

    r238754 r259641  
    3131endif ()
    3232
    33 list(APPEND PAL_SYSTEM_INCLUDE_DIRECTORIES
    34     ${GDK_INCLUDE_DIRS}
     33list(APPEND PAL_LIBRARIES
     34    GTK::GTK
    3535)
  • trunk/Source/WebCore/PlatformGTK.cmake

    r257705 r259641  
    7979    ${ATK_LIBRARIES}
    8080    ${ENCHANT_LIBRARIES}
    81     ${GDK_LIBRARIES}
    8281    ${GLIB_GIO_LIBRARIES}
    8382    ${GLIB_GMODULE_LIBRARIES}
    8483    ${GLIB_GOBJECT_LIBRARIES}
    8584    ${GLIB_LIBRARIES}
    86     ${GTK_LIBRARIES}
    8785    ${LIBSECCOMP_LIBRARIES}
    8886    ${LIBSECRET_LIBRARIES}
     
    9593    ${X11_Xrender_LIB}
    9694    ${X11_Xt_LIB}
     95    GTK::GTK
    9796)
    9897
     
    106105    ${ATK_INCLUDE_DIRS}
    107106    ${ENCHANT_INCLUDE_DIRS}
    108     ${GDK_INCLUDE_DIRS}
    109107    ${GIO_UNIX_INCLUDE_DIRS}
    110108    ${GLIB_INCLUDE_DIRS}
    111     ${GTK_INCLUDE_DIRS}
    112109    ${LIBSECCOMP_INCLUDE_DIRS}
    113110    ${LIBSECRET_INCLUDE_DIRS}
     
    167164)
    168165
    169 list(APPEND WebCoreTestSupport_LIBRARIES PRIVATE ${GTK_LIBRARIES})
    170 list(APPEND WebCoreTestSupport_SYSTEM_INCLUDE_DIRECTORIES ${GTK_INCLUDE_DIRS})
     166list(APPEND WebCoreTestSupport_LIBRARIES PRIVATE GTK::GTK)
    171167
    172168add_definitions(-DBUILDING_WEBKIT)
  • trunk/Source/cmake/OptionsGTK.cmake

    r259606 r259641  
    2828find_package(LibGcrypt 1.6.0 REQUIRED)
    2929find_package(GLIB 2.44.0 REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule)
    30 find_package(GTK3 3.22.0 REQUIRED)
    31 find_package(GDK3 3.22.0 REQUIRED)
     30find_package(GTK 3.22.0 REQUIRED)
    3231find_package(HarfBuzz 0.9.18 REQUIRED COMPONENTS ICU)
    3332find_package(ICU 60.2 REQUIRED COMPONENTS data i18n uc)
     
    8483WEBKIT_OPTION_DEFINE(ENABLE_INTROSPECTION "Whether to enable GObject introspection." PUBLIC ON)
    8584WEBKIT_OPTION_DEFINE(ENABLE_OPENGL "Whether to use OpenGL." PUBLIC ON)
    86 WEBKIT_OPTION_DEFINE(ENABLE_QUARTZ_TARGET "Whether to enable support for the Quartz windowing target." PUBLIC ${GTK3_SUPPORTS_QUARTZ})
    87 WEBKIT_OPTION_DEFINE(ENABLE_X11_TARGET "Whether to enable support for the X11 windowing target." PUBLIC ${GTK3_SUPPORTS_X11})
    88 WEBKIT_OPTION_DEFINE(ENABLE_WAYLAND_TARGET "Whether to enable support for the Wayland windowing target." PUBLIC ${GTK3_SUPPORTS_WAYLAND})
     85WEBKIT_OPTION_DEFINE(ENABLE_QUARTZ_TARGET "Whether to enable support for the Quartz windowing target." PUBLIC ${GTK_SUPPORTS_QUARTZ})
     86WEBKIT_OPTION_DEFINE(ENABLE_X11_TARGET "Whether to enable support for the X11 windowing target." PUBLIC ${GTK_SUPPORTS_X11})
     87WEBKIT_OPTION_DEFINE(ENABLE_WAYLAND_TARGET "Whether to enable support for the Wayland windowing target." PUBLIC ${GTK_SUPPORTS_WAYLAND})
    8988WEBKIT_OPTION_DEFINE(USE_LIBNOTIFY "Whether to enable the default web notification implementation." PUBLIC ON)
    9089WEBKIT_OPTION_DEFINE(USE_LIBHYPHEN "Whether to enable the default automatic hyphenation implementation." PUBLIC ON)
     
    212211add_definitions(-DSVN_REVISION="${SVN_REVISION}")
    213212
    214 set(GTK_LIBRARIES ${GTK3_LIBRARIES})
    215 set(GTK_INCLUDE_DIRS ${GTK3_INCLUDE_DIRS})
    216 set(GDK_LIBRARIES ${GDK3_LIBRARIES})
    217 set(GDK_INCLUDE_DIRS ${GDK3_INCLUDE_DIRS})
    218 
    219213SET_AND_EXPOSE_TO_BUILD(HAVE_GTK_UNIX_PRINTING ${GTKUnixPrint_FOUND})
    220214
     
    330324
    331325if (ENABLE_QUARTZ_TARGET)
    332     if (NOT GTK3_SUPPORTS_QUARTZ)
     326    if (NOT GTK_SUPPORTS_QUARTZ)
    333327        message(FATAL_ERROR "Recompile GTK with Quartz backend to use ENABLE_QUARTZ_TARGET")
    334328    endif ()
     
    336330
    337331if (ENABLE_X11_TARGET)
    338     if (NOT GTK3_SUPPORTS_X11)
     332    if (NOT GTK_SUPPORTS_X11)
    339333        message(FATAL_ERROR "Recompile GTK with X11 backend to use ENABLE_X11_TARGET")
    340334    endif ()
     
    353347
    354348if (ENABLE_WAYLAND_TARGET)
    355     if (NOT GTK3_SUPPORTS_WAYLAND)
     349    if (NOT GTK_SUPPORTS_WAYLAND)
    356350        message(FATAL_ERROR "Recompile GTK with Wayland backend to use ENABLE_WAYLAND_TARGET")
    357351    endif ()
  • trunk/Tools/ChangeLog

    r259634 r259641  
     12020-04-07  Adrian Perez de Castro  <aperez@igalia.com>
     2
     3        [GTK] CMake find module for GTK4
     4        https://bugs.webkit.org/show_bug.cgi?id=210110
     5
     6        Reviewed by Don Olmstead.
     7
     8        * MiniBrowser/gtk/CMakeLists.txt: Use the GTK::GTK imported target.
     9        * TestWebKitAPI/PlatformGTK.cmake: Ditto.
     10        * TestWebKitAPI/glib/PlatformGTK.cmake: Ditto.
     11        * WebKitTestRunner/PlatformGTK.cmake: Ditto.
     12
    1132020-04-07  Youenn Fablet  <youenn@apple.com>
    214
  • trunk/Tools/MiniBrowser/gtk/CMakeLists.txt

    r259563 r259641  
    3030
    3131set(MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES
    32     ${GTK3_INCLUDE_DIRS}
    3332    ${GLIB_INCLUDE_DIRS}
    3433    ${LIBSOUP_INCLUDE_DIRS}
     
    3938    ${GLIB_LIBRARIES}
    4039    ${GSTREAMER_LIBRARIES}
    41     ${GTK3_LIBRARIES}
    4240    ${JavaScriptCore_LIBRARY_NAME}
    4341    ${LIBSOUP_LIBRARIES}
     42    GTK::GTK
    4443    WebKit::WebKit
    4544)
  • trunk/Tools/TestWebKitAPI/PlatformGTK.cmake

    r254940 r259641  
    2323list(APPEND TestWTF_SYSTEM_INCLUDE_DIRECTORIES
    2424    ${GLIB_INCLUDE_DIRS}
    25     ${GTK3_INCLUDE_DIRS}
    2625)
    2726
    2827list(APPEND TestWTF_LIBRARIES
    29     ${GDK3_LIBRARIES}
    30     ${GTK3_LIBRARIES}
     28    GTK::GTK
    3129)
    3230
     
    4341list(APPEND TestWebCore_SYSTEM_INCLUDE_DIRECTORIES
    4442    ${GLIB_INCLUDE_DIRS}
    45     ${GTK3_INCLUDE_DIRS}
    4643)
    4744
    4845list(APPEND TestWebCore_LIBRARIES
    49     ${GDK3_LIBRARIES}
    50     ${GTK3_LIBRARIES}
     46    GTK::GTK
    5147)
    5248ADD_WHOLE_ARCHIVE_TO_LIBRARIES(TestWebCore_LIBRARIES)
     
    6864list(APPEND TestWebKit_SYSTEM_INCLUDE_DIRECTORIES
    6965    ${GLIB_INCLUDE_DIRS}
    70     ${GTK3_INCLUDE_DIRS}
    7166)
    7267
    7368list(APPEND TestWebKit_LIBRARIES
    74     ${GDK3_LIBRARIES}
    75     ${GTK3_LIBRARIES}
     69    GTK::GTK
    7670)
    7771
     
    9084target_include_directories(TestWebKitAPIInjectedBundle SYSTEM PRIVATE
    9185    ${GLIB_INCLUDE_DIRS}
    92     ${GTK3_INCLUDE_DIRS}
    9386)
    9487
     
    10093set(TestJSC_SYSTEM_INCLUDE_DIRECTORIES
    10194    ${GLIB_INCLUDE_DIRS}
    102     ${GTK3_INCLUDE_DIRS}
    10395)
    10496
  • trunk/Tools/TestWebKitAPI/glib/PlatformGTK.cmake

    r254819 r259641  
    1515list(APPEND WebKitGLibAPITests_SYSTEM_INCLUDE_DIRECTORIES
    1616    ${ATSPI_INCLUDE_DIRS}
    17     ${GTK3_INCLUDE_DIRS}
    1817    ${GTK_UNIX_PRINT_INCLUDE_DIRS}
    1918)
     
    2120list(APPEND WebKitGLibAPITest_LIBRARIES
    2221    ${ATSPI_LIBRARIES}
    23     ${GTK3_LIBRARIES}
    2422    ${GTK_UNIX_PRINT_LIBRARIES}
     23    GTK::GTK
    2524)
    2625
  • trunk/Tools/WebKitTestRunner/PlatformGTK.cmake

    r256601 r259641  
    2121list(APPEND WebKitTestRunner_SYSTEM_INCLUDE_DIRECTORIES
    2222    ${ATK_INCLUDE_DIRS}
    23     ${GTK3_INCLUDE_DIRS}
    2423    ${GLIB_INCLUDE_DIRS}
    2524)
     
    2827    Cairo::Cairo
    2928    ${ATK_LIBRARIES}
    30     ${GTK3_LIBRARIES}
    3129    ${GLIB_LIBRARIES}
     30    GTK::GTK
    3231    WebCore
    3332)
     
    3635    ${ATK_LIBRARIES}
    3736    ${GLIB_LIBRARIES}
    38     ${GTK3_LIBRARIES}
    3937    Fontconfig::Fontconfig
     38    GTK::GTK
    4039    WebCoreTestSupport
    4140    WebKit
Note: See TracChangeset for help on using the changeset viewer.