Diff
Modified: trunk/ChangeLog (260426 => 260427)
--- trunk/ChangeLog 2020-04-21 13:26:37 UTC (rev 260426)
+++ trunk/ChangeLog 2020-04-21 15:26:53 UTC (rev 260427)
@@ -1,3 +1,14 @@
+2020-04-21 Adrian Perez de Castro <[email protected]>
+
+ [GTK][CMake] Make gtk-unix-print a component of FindGTK.cmake
+ https://bugs.webkit.org/show_bug.cgi?id=210792
+
+ Reviewed by Carlos Garcia Campos.
+
+ * Source/cmake/FindGTK.cmake: Support an "unix-print" component.
+ * Source/cmake/FindGTKUnixPrint.cmake: Removed.
+ * Source/cmake/OptionsGTK.cmake: Use the "unix-print" component of the GTK find module.
+
2020-04-20 Carlos Garcia Campos <[email protected]>
[GTK][WPE] Enable resource load statistics
Modified: trunk/Source/WebKit/ChangeLog (260426 => 260427)
--- trunk/Source/WebKit/ChangeLog 2020-04-21 13:26:37 UTC (rev 260426)
+++ trunk/Source/WebKit/ChangeLog 2020-04-21 15:26:53 UTC (rev 260427)
@@ -1,3 +1,14 @@
+2020-04-21 Adrian Perez de Castro <[email protected]>
+
+ [GTK][CMake] Make gtk-unix-print a component of FindGTK.cmake
+ https://bugs.webkit.org/show_bug.cgi?id=210792
+
+ Reviewed by Carlos Garcia Campos.
+
+ No new tests needed.
+
+ * PlatformGTK.cmake: Use the GTK::UnixPrint imported target.
+
2020-04-21 Philippe Normand <[email protected]>
[CMake] gst-build-backed build fails
Modified: trunk/Source/WebKit/PlatformGTK.cmake (260426 => 260427)
--- trunk/Source/WebKit/PlatformGTK.cmake 2020-04-21 13:26:37 UTC (rev 260426)
+++ trunk/Source/WebKit/PlatformGTK.cmake 2020-04-21 15:26:53 UTC (rev 260427)
@@ -426,7 +426,6 @@
${GSTREAMER_INCLUDE_DIRS}
${GSTREAMER_PBUTILS_INCLUDE_DIRS}
${GTK_INCLUDE_DIRS}
- ${GTK_UNIX_PRINT_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
)
@@ -460,10 +459,6 @@
GPUProcess/EntryPoint/unix/GPUProcessMain.cpp
)
-list(APPEND WebKit_LIBRARIES
- ${GTK_UNIX_PRINT_LIBRARIES}
-)
-
if (USE_WPE_RENDERER)
list(APPEND WebKit_LIBRARIES
WPE::libwpe
@@ -471,6 +466,10 @@
)
endif ()
+if (GTK_UNIX_PRINT_FOUND)
+ list(APPEND WebKit_LIBRARIES GTK::UnixPrint)
+endif ()
+
if (LIBNOTIFY_FOUND)
list(APPEND WebKit_PRIVATE_LIBRARIES
${LIBNOTIFY_LIBRARIES}
Modified: trunk/Source/cmake/FindGTK.cmake (260426 => 260427)
--- trunk/Source/cmake/FindGTK.cmake 2020-04-21 13:26:37 UTC (rev 260426)
+++ trunk/Source/cmake/FindGTK.cmake 2020-04-21 15:26:53 UTC (rev 260427)
@@ -30,11 +30,22 @@
Find GTK headers and libraries.
+Optional Components
+^^^^^^^^^^^^^^^^^^^
+
+The ``COMPONENTS`` (or ``OPTIONAL_COMPONENTS``) keyword can be passed to
+``find_package()``, the following GTK components can be searched for:
+
+- ``unix-print``
+
+
Imported Targets
^^^^^^^^^^^^^^^^
``GTK::GTK``
The GTK library, if found.
+``GTK::UnixPrint``
+ The GTK unix-print library, if found.
Result Variables
^^^^^^^^^^^^^^^^
@@ -43,6 +54,8 @@
``GTK_FOUND``
true if (the requested version of) GTK is available.
+``GTK_UNIX_PRINT_FOUND``
+ true if the ``unix-print`` component is available.
``GTK_4``
whether GTK 4 was detected
``GTK_3``
@@ -68,10 +81,12 @@
if (GTK_FIND_VERSION VERSION_LESS 3.90)
set(GTK_PC_MODULE "gtk+-3.0")
+ set(GTK_PC_UNIX_PRINT_MODULE "gtk+-unix-print-3.0")
set(GTK_4 FALSE)
set(GTK_3 TRUE)
else ()
set(GTK_PC_MODULE "gtk4")
+ set(GTK_PC_UNIX_PRINT_MODULE "gtk4-unix-print")
set(GTK_4 TRUE)
set(GTK_3 FALSE)
endif ()
@@ -115,5 +130,21 @@
)
endif ()
+# Try to find additional components
+foreach (gtk_component ${GTK_FIND_COMPONENTS})
+ if (NOT "${gtk_component}" STREQUAL unix-print)
+ message(FATAL_ERROR "Invalid component name: ${gtk_component}")
+ endif ()
+ pkg_check_modules(GTK_UNIX_PRINT IMPORTED_TARGET "${GTK_PC_UNIX_PRINT_MODULE}")
+ if (GTK_FIND_REQUIRED_unix-print AND NOT GTK_UNIX_PRINT_FOUND)
+ message(FATAL_ERROR "Component unix-print not found")
+ endif ()
+ if (TARGET PkgConfig::GTK_UNIX_PRINT AND NOT TARGET GTK::UnixPrint)
+ add_library(GTK::UnixPrint INTERFACE IMPORTED GLOBAL)
+ set_property(TARGET GTK::UnixPrint PROPERTY
+ INTERFACE_LINK_LIBRARIES PkgConfig::GTK_UNIX_PRINT)
+ endif ()
+endforeach ()
+
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK DEFAULT_MSG GTK_VERSION GTK_VERSION_OK)
Deleted: trunk/Source/cmake/FindGTKUnixPrint.cmake (260426 => 260427)
--- trunk/Source/cmake/FindGTKUnixPrint.cmake 2020-04-21 13:26:37 UTC (rev 260426)
+++ trunk/Source/cmake/FindGTKUnixPrint.cmake 2020-04-21 15:26:53 UTC (rev 260427)
@@ -1,49 +0,0 @@
-# - Try to find gtk-unix-print
-# Once done, this will define
-#
-# GTKUnixPrint_FOUND - system has gtk-unix-print
-# GTK_UNIX_PRINT_INCLUDE_DIRS - the gtk-unix-print include directories
-# GTK_UNIX_PRINT_LIBRARIES - link these to use gtk-unix-print
-#
-# Copyright (C) 2012 Raphael Kubo da Costa <[email protected]>
-# Copyright (C) 2014 Igalia S.L.
-#
-# 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.
-
-find_package(PkgConfig QUIET)
-pkg_check_modules(GTK_UNIX_PRINT gtk+-unix-print-3.0)
-
-set(VERSION_OK TRUE)
-if (GTK_UNIX_PRINT_VERSION)
- if (GTK_UNIX_PRINT_FIND_VERSION_EXACT)
- if (NOT("${GTK_UNIX_PRINT_FIND_VERSION}" VERSION_EQUAL "${GTK_UNIX_PRINT_VERSION}"))
- set(VERSION_OK FALSE)
- endif ()
- else ()
- if ("${GTK_UNIX_PRINT_VERSION}" VERSION_LESS "${GTK_UNIX_PRINT_FIND_VERSION}")
- set(VERSION_OK FALSE)
- endif ()
- endif ()
-endif ()
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(GTKUnixPrint REQUIRED_VARS GTK_UNIX_PRINT_INCLUDE_DIRS GTK_UNIX_PRINT_LIBRARIES VERSION_OK)
Modified: trunk/Source/cmake/OptionsGTK.cmake (260426 => 260427)
--- trunk/Source/cmake/OptionsGTK.cmake 2020-04-21 13:26:37 UTC (rev 260426)
+++ trunk/Source/cmake/OptionsGTK.cmake 2020-04-21 15:26:53 UTC (rev 260427)
@@ -38,7 +38,7 @@
find_package(Freetype 2.4.2 REQUIRED)
find_package(LibGcrypt 1.6.0 REQUIRED)
find_package(GLIB 2.44.0 REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule)
-find_package(GTK ${GTK_MINIMUM_VERSION} REQUIRED)
+find_package(GTK ${GTK_MINIMUM_VERSION} REQUIRED OPTIONAL_COMPONENTS unix-print)
find_package(HarfBuzz 0.9.18 REQUIRED COMPONENTS ICU)
find_package(ICU 60.2 REQUIRED COMPONENTS data i18n uc)
find_package(JPEG REQUIRED)
@@ -52,7 +52,6 @@
find_package(WebP REQUIRED COMPONENTS demux)
find_package(ATSPI 2.5.3)
find_package(EGL)
-find_package(GTKUnixPrint)
find_package(OpenGL)
find_package(OpenGLES2)
@@ -224,7 +223,7 @@
endif ()
add_definitions(-DSVN_REVISION="${SVN_REVISION}")
-SET_AND_EXPOSE_TO_BUILD(HAVE_GTK_UNIX_PRINTING ${GTKUnixPrint_FOUND})
+SET_AND_EXPOSE_TO_BUILD(HAVE_GTK_UNIX_PRINTING ${GTK_UNIX_PRINT_FOUND})
if (USE_WPE_RENDERER)
find_package(WPE 1.3.0)
Modified: trunk/Tools/ChangeLog (260426 => 260427)
--- trunk/Tools/ChangeLog 2020-04-21 13:26:37 UTC (rev 260426)
+++ trunk/Tools/ChangeLog 2020-04-21 15:26:53 UTC (rev 260427)
@@ -1,3 +1,12 @@
+2020-04-21 Adrian Perez de Castro <[email protected]>
+
+ [GTK][CMake] Make gtk-unix-print a component of FindGTK.cmake
+ https://bugs.webkit.org/show_bug.cgi?id=210792
+
+ Reviewed by Carlos Garcia Campos.
+
+ * TestWebKitAPI/glib/PlatformGTK.cmake: Use the GTK::UnixPrint imported target.
+
2020-04-21 Philippe Normand <[email protected]>
[Flatpak SDK] Silence git stderr output
Modified: trunk/Tools/TestWebKitAPI/glib/PlatformGTK.cmake (260426 => 260427)
--- trunk/Tools/TestWebKitAPI/glib/PlatformGTK.cmake 2020-04-21 13:26:37 UTC (rev 260426)
+++ trunk/Tools/TestWebKitAPI/glib/PlatformGTK.cmake 2020-04-21 15:26:53 UTC (rev 260427)
@@ -14,15 +14,17 @@
list(APPEND WebKitGLibAPITests_SYSTEM_INCLUDE_DIRECTORIES
${ATSPI_INCLUDE_DIRS}
- ${GTK_UNIX_PRINT_INCLUDE_DIRS}
)
list(APPEND WebKitGLibAPITest_LIBRARIES
${ATSPI_LIBRARIES}
- ${GTK_UNIX_PRINT_LIBRARIES}
GTK::GTK
)
+if (GTK_UNIX_PRINT_FOUND)
+ list(APPEND WebKitGLibAPITest_LIBRARIES GTK::UnixPrint)
+endif ()
+
list(APPEND WebKitGLibAPIWebProcessTests
${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGtk/AutocleanupsTest.cpp
${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGtk/DOMClientRectTest.cpp