[GTK] Re-enable Quartz backend on cmake build system
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Nov 2015 09:39:30 +0000 (09:39 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Nov 2015 09:39:30 +0000 (09:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=144561

Reviewed by Philippe Normand.

* Source/cmake/FindGTK3.cmake: Set GTK3_SUPPORTS_QUARTZ based on
the presence of of gtk+-quartz-3.0 module.
* Source/cmake/OptionsGTK.cmake: Reintroduce the
ENABLE_QUARTZ_TARGET option to the CMake build, for building the
GTK+ Quartz backend on OS X.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192095 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/cmake/FindGTK3.cmake
Source/cmake/OptionsGTK.cmake

index 9ad2f5c..6a1cc73 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2015-11-06  Philip Chimento  <philip.chimento@gmail.com> and Michael Catanzaro <mcatanzaro@igalia.com>
+
+        [GTK] Re-enable Quartz backend on cmake build system
+        https://bugs.webkit.org/show_bug.cgi?id=144561
+
+        Reviewed by Philippe Normand.
+
+        * Source/cmake/FindGTK3.cmake: Set GTK3_SUPPORTS_QUARTZ based on
+        the presence of of gtk+-quartz-3.0 module.
+        * Source/cmake/OptionsGTK.cmake: Reintroduce the
+        ENABLE_QUARTZ_TARGET option to the CMake build, for building the
+        GTK+ Quartz backend on OS X.
+
 2015-11-05  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
 
         Add runtime and compile time flags for enabling Web Animations API and model.
index 6bc2649..c1d48f0 100644 (file)
@@ -5,6 +5,7 @@
 #  GTK3_INCLUDE_DIRS - the GTK+ 3. include directories
 #  GTK3_LIBRARIES - link these to use GTK+ 3.
 #  GTK3_SUPPORTS_GESTURES - GTK+ supports gestures (GTK+ >= 3.14)
+#  GTK3_SUPPORTS_QUARTZ - GTK+ supports Quartz backend
 #  GTK3_SUPPORTS_X11 - GTK+ supports X11 backend
 #  GTK3_SUPPORTS_WAYLAND - GTK+ supports Wayland backend
 #
@@ -49,6 +50,11 @@ if (GTK3_VERSION)
 endif ()
 
 if (GTK3_VERSION AND VERSION_OK)
+    pkg_check_modules(GTK3_QUARTZ gtk+-quartz-3.0)
+    if ("${GTK3_QUARTZ_VERSION}" VERSION_EQUAL "${GTK3_VERSION}")
+        set(GTK3_SUPPORTS_QUARTZ TRUE)
+    endif ()
+
     pkg_check_modules(GTK3_X11 gtk+-x11-3.0)
     if ("${GTK3_X11_VERSION}" VERSION_EQUAL "${GTK3_VERSION}")
         set(GTK3_SUPPORTS_X11 TRUE)
index 1d5d3d1..a80e1b6 100644 (file)
@@ -71,6 +71,7 @@ WEBKIT_OPTION_DEFINE(ENABLE_GTKDOC "Whether or not to use generate gtkdoc." PUBL
 WEBKIT_OPTION_DEFINE(ENABLE_INTROSPECTION "Whether to enable GObject introspection." PUBLIC ON)
 WEBKIT_OPTION_DEFINE(ENABLE_OPENGL "Whether to use OpenGL." PUBLIC ON)
 WEBKIT_OPTION_DEFINE(ENABLE_PLUGIN_PROCESS_GTK2 "Whether to build WebKitPluginProcess2 to load GTK2 based plugins." PUBLIC ON)
+WEBKIT_OPTION_DEFINE(ENABLE_QUARTZ_TARGET "Whether to enable support for the Quartz windowing target." PUBLIC ${GTK3_SUPPORTS_QUARTZ})
 WEBKIT_OPTION_DEFINE(ENABLE_X11_TARGET "Whether to enable support for the X11 windowing target." PUBLIC ${GTK3_SUPPORTS_X11})
 WEBKIT_OPTION_DEFINE(ENABLE_WAYLAND_TARGET "Whether to enable support for the Wayland windowing target." PUBLIC ${GTK3_SUPPORTS_WAYLAND})
 WEBKIT_OPTION_DEFINE(USE_LIBNOTIFY "Whether to enable the default web notification implementation." PUBLIC ON)
@@ -186,6 +187,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SHADOW_DOM PRIVATE OFF)
 # this point, and do not attempt to change any option after this point.
 WEBKIT_OPTION_END()
 
+SET_AND_EXPOSE_TO_BUILD(WTF_PLATFORM_QUARTZ ${ENABLE_QUARTZ_TARGET})
 SET_AND_EXPOSE_TO_BUILD(WTF_PLATFORM_X11 ${ENABLE_X11_TARGET})
 SET_AND_EXPOSE_TO_BUILD(WTF_PLATFORM_WAYLAND ${ENABLE_WAYLAND_TARGET})
 
@@ -392,6 +394,12 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
     SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER TRUE)
 endif ()
 
+if (ENABLE_QUARTZ_TARGET)
+    if (NOT GTK3_SUPPORTS_QUARTZ)
+        message(FATAL_ERROR "Recompile GTK+ with Quartz backend to use ENABLE_QUARTZ_TARGET")
+    endif ()
+endif ()
+
 if (ENABLE_X11_TARGET)
     if (NOT GTK3_SUPPORTS_X11)
         message(FATAL_ERROR "Recompile GTK+ with X11 backend to use ENABLE_X11_TARGET")