Title: [165737] trunk
Revision
165737
Author
[email protected]
Date
2014-03-17 09:40:27 -0700 (Mon, 17 Mar 2014)

Log Message

[GTK][CMake] Ensure that HAVE_GTK_UNIX_PRINTING is defined when appropriate
https://bugs.webkit.org/show_bug.cgi?id=130155

Reviewed by Philippe Normand.

.:

* Source/cmake/FindGTKUnixPrint.cmake: Added.
* Source/cmake/OptionsGTK.cmake: Look for gtk+-unix-print and use it to turn on HAVE_GTK_UNIX_PRINTING.
* Source/cmakeconfig.h.cmake: Add the HAVE_GTK_UNIX_PRINTING define.

Source/WebKit2:

* PlatformGTK.cmake: Add GTK_UNIX_PRINT flags to the build.

Tools:

* TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt: Add GTK_UNIX_PRINT flags to the build.

Modified Paths

Added Paths

Diff

Modified: trunk/ChangeLog (165736 => 165737)


--- trunk/ChangeLog	2014-03-17 16:26:53 UTC (rev 165736)
+++ trunk/ChangeLog	2014-03-17 16:40:27 UTC (rev 165737)
@@ -1,3 +1,14 @@
+2014-03-17  Martin Robinson  <[email protected]>
+
+        [GTK][CMake] Ensure that HAVE_GTK_UNIX_PRINTING is defined when appropriate
+        https://bugs.webkit.org/show_bug.cgi?id=130155
+
+        Reviewed by Philippe Normand.
+
+        * Source/cmake/FindGTKUnixPrint.cmake: Added.
+        * Source/cmake/OptionsGTK.cmake: Look for gtk+-unix-print and use it to turn on HAVE_GTK_UNIX_PRINTING.
+        * Source/cmakeconfig.h.cmake: Add the HAVE_GTK_UNIX_PRINTING define.
+
 2014-03-16  Kim Byung Jun  <[email protected]>
 
         [EFL] Enable TOUCH_SLIDER macro.

Modified: trunk/Source/WebKit2/ChangeLog (165736 => 165737)


--- trunk/Source/WebKit2/ChangeLog	2014-03-17 16:26:53 UTC (rev 165736)
+++ trunk/Source/WebKit2/ChangeLog	2014-03-17 16:40:27 UTC (rev 165737)
@@ -1,3 +1,12 @@
+2014-03-17  Martin Robinson  <[email protected]>
+
+        [GTK][CMake] Ensure that HAVE_GTK_UNIX_PRINTING is defined when appropriate
+        https://bugs.webkit.org/show_bug.cgi?id=130155
+
+        Reviewed by Philippe Normand.
+
+        * PlatformGTK.cmake: Add GTK_UNIX_PRINT flags to the build.
+
 2014-03-17  Ryuan Choi  <[email protected]>
 
         [EFL][WK2] Restore cursor when moving mouse into webview

Modified: trunk/Source/WebKit2/PlatformGTK.cmake (165736 => 165737)


--- trunk/Source/WebKit2/PlatformGTK.cmake	2014-03-17 16:26:53 UTC (rev 165736)
+++ trunk/Source/WebKit2/PlatformGTK.cmake	2014-03-17 16:40:27 UTC (rev 165737)
@@ -439,6 +439,7 @@
 list(APPEND WebKit2_INCLUDE_DIRECTORIES
     ${GLIB_INCLUDE_DIRS}
     ${GTK_INCLUDE_DIRS}
+    ${GTK_UNIX_PRINT_INCLUDE_DIRS}
 )
 
 list(APPEND WebProcess_SOURCES
@@ -453,11 +454,10 @@
     ${WebKit2_LIBRARIES}
 )
 
-# Since the GObjectDOMBindings convenience library exports API that is unused except
-# in embedding applications we need to instruct the linker to link all symbols explicitly.
 list(APPEND WebKit2_LIBRARIES
     GObjectDOMBindings
     WebCorePlatformGTK
+    ${GTK_UNIX_PRINT_LIBRARIES}
 )
 ADD_WHOLE_ARCHIVE_TO_LIBRARIES(WebKit2_LIBRARIES)
 

Added: trunk/Source/cmake/FindGTKUnixPrint.cmake (0 => 165737)


--- trunk/Source/cmake/FindGTKUnixPrint.cmake	                        (rev 0)
+++ trunk/Source/cmake/FindGTKUnixPrint.cmake	2014-03-17 16:40:27 UTC (rev 165737)
@@ -0,0 +1,49 @@
+# - Try to find gtk-unix-print
+# Once done, this will define
+#
+#  GTK_UNIX_PRINT_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)
+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(GTK_UNIX_PRINT DEFAULT_MSG GTK_UNIX_PRINT_INCLUDE_DIRS GTK_UNIX_PRINT_LIBRARIES VERSION_OK)

Modified: trunk/Source/cmake/OptionsGTK.cmake (165736 => 165737)


--- trunk/Source/cmake/OptionsGTK.cmake	2014-03-17 16:26:53 UTC (rev 165736)
+++ trunk/Source/cmake/OptionsGTK.cmake	2014-03-17 16:40:27 UTC (rev 165737)
@@ -214,6 +214,11 @@
     endif ()
 endif ()
 
+find_package(GTKUnixPrint)
+if (GTK_UNIX_PRINTING_FOUND)
+    set(HAVE_GTK_UNIX_PRINTING)
+endif ()
+
 # We don't use find_package for GLX because it is part of -lGL, unlike EGL.
 find_package(OpenGL)
 check_include_files("GL/glx.h" GLX_FOUND)

Modified: trunk/Source/cmakeconfig.h.cmake (165736 => 165737)


--- trunk/Source/cmakeconfig.h.cmake	2014-03-17 16:26:53 UTC (rev 165736)
+++ trunk/Source/cmakeconfig.h.cmake	2014-03-17 16:40:27 UTC (rev 165737)
@@ -126,6 +126,7 @@
 #cmakedefine01 WTF_USE_GEOCLUE2
 #cmakedefine01 WTF_USE_TILED_BACKING_STORE
 #cmakedefine01 HAVE_LLVM
+#cmakedefine01 HAVE_GTK_UNIX_PRINTING
 
 #if defined(BUILDING_GTK__) && !defined(GTK_API_VERSION_2)
 #define GDK_VERSION_MIN_REQUIRED @GDK_VERSION_MIN_REQUIRED@

Modified: trunk/Tools/ChangeLog (165736 => 165737)


--- trunk/Tools/ChangeLog	2014-03-17 16:26:53 UTC (rev 165736)
+++ trunk/Tools/ChangeLog	2014-03-17 16:40:27 UTC (rev 165737)
@@ -1,3 +1,12 @@
+2014-03-17  Martin Robinson  <[email protected]>
+
+        [GTK][CMake] Ensure that HAVE_GTK_UNIX_PRINTING is defined when appropriate
+        https://bugs.webkit.org/show_bug.cgi?id=130155
+
+        Reviewed by Philippe Normand.
+
+        * TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt: Add GTK_UNIX_PRINT flags to the build.
+
 2014-03-17  Carlos Garcia Campos  <[email protected]>
 
         [GTK] MiniBrowser fails to load injected bundle lib

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt (165736 => 165737)


--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt	2014-03-17 16:26:53 UTC (rev 165736)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt	2014-03-17 16:40:27 UTC (rev 165737)
@@ -24,6 +24,7 @@
     ${ATSPI_INCLUDE_DIRS}
     ${GLIB_INCLUDE_DIRS}
     ${GTK3_INCLUDE_DIRS}
+    ${GTK_UNIX_PRINT_INCLUDE_DIRS}
     ${LIBSOUP_INCLUDE_DIRS}
 )
 
@@ -72,6 +73,7 @@
         ${ATSPI_LIBRARIES}
         ${GLIB_LIBRARIES}
         ${GTK3_LIBRARIES}
+        ${GTK_UNIX_PRINT_LIBRARIES}
         ${LIBSOUP_LIBRARIES}
     )
     set_target_properties(${test_name} PROPERTIES
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to