<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[170663] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/170663">170663</a></dd>
<dt>Author</dt> <dd>zandobersek@gmail.com</dd>
<dt>Date</dt> <dd>2014-07-01 13:45:47 -0700 (Tue, 01 Jul 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[CMake] Add necessary support for building for the Wayland target
https://bugs.webkit.org/show_bug.cgi?id=134160

Reviewed by Darin Adler.


.: 
* Source/cmake/FindGTK3.cmake: Check for the gtk+-x11-3.0 package if the X11 target
is enabled, and that its version matches the version of the generic package. Same
for the gtk+-wayland-3.0 package and the Wayland target.
* Source/cmake/OptionsCommon.cmake: Don't add the -DXP_UNIX definition here.
* Source/cmake/OptionsEfl.cmake: Add -DXP_UNIX here for the EFL port, under the same
condition as in OptionsCommon.cmake. ENABLE_X11_TARGET is enabled by default for EFL
so they keep building the TestNetscapePlugin target.
* Source/cmake/OptionsGTK.cmake: Enable the X11 target and disable the Wayland target
by default. Group all the X11-specific macro definitions (WTF_PLATFORM_X11, MOZ_X11,
XP_UNIX) and only add them if the X11 target is enabled. Similar goes for the Wayland
target and WTF_PLATFORM_WAYLAND. The Wayland target requires GTK+ 3.12.0, so that's
the minimum required version as soon as that target is enabled. Only search for GLX
if the X11 target is enabled.

Tools: 
* CMakeLists.txt: Only build the TestNetscapePlugIn target in case
the X11 windowing target is enabled.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkChangeLog">trunk/ChangeLog</a></li>
<li><a href="#trunkSourcecmakeFindGTK3cmake">trunk/Source/cmake/FindGTK3.cmake</a></li>
<li><a href="#trunkSourcecmakeOptionsCommoncmake">trunk/Source/cmake/OptionsCommon.cmake</a></li>
<li><a href="#trunkSourcecmakeOptionsEflcmake">trunk/Source/cmake/OptionsEfl.cmake</a></li>
<li><a href="#trunkSourcecmakeOptionsGTKcmake">trunk/Source/cmake/OptionsGTK.cmake</a></li>
<li><a href="#trunkToolsCMakeListstxt">trunk/Tools/CMakeLists.txt</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/ChangeLog (170662 => 170663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/ChangeLog        2014-07-01 20:38:37 UTC (rev 170662)
+++ trunk/ChangeLog        2014-07-01 20:45:47 UTC (rev 170663)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2014-07-01  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
+
+        [CMake] Add necessary support for building for the Wayland target
+        https://bugs.webkit.org/show_bug.cgi?id=134160
+
+        Reviewed by Darin Adler.
+
+        * Source/cmake/FindGTK3.cmake: Check for the gtk+-x11-3.0 package if the X11 target
+        is enabled, and that its version matches the version of the generic package. Same
+        for the gtk+-wayland-3.0 package and the Wayland target.
+        * Source/cmake/OptionsCommon.cmake: Don't add the -DXP_UNIX definition here.
+        * Source/cmake/OptionsEfl.cmake: Add -DXP_UNIX here for the EFL port, under the same
+        condition as in OptionsCommon.cmake. ENABLE_X11_TARGET is enabled by default for EFL
+        so they keep building the TestNetscapePlugin target.
+        * Source/cmake/OptionsGTK.cmake: Enable the X11 target and disable the Wayland target
+        by default. Group all the X11-specific macro definitions (WTF_PLATFORM_X11, MOZ_X11,
+        XP_UNIX) and only add them if the X11 target is enabled. Similar goes for the Wayland
+        target and WTF_PLATFORM_WAYLAND. The Wayland target requires GTK+ 3.12.0, so that's
+        the minimum required version as soon as that target is enabled. Only search for GLX
+        if the X11 target is enabled.
+
</ins><span class="cx"> 2014-06-29  Yoav Weiss  &lt;yoav@yoav.ws&gt;
</span><span class="cx"> 
</span><span class="cx">         Add support for HTMLImageElement's sizes attribute
</span></span></pre></div>
<a id="trunkSourcecmakeFindGTK3cmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/cmake/FindGTK3.cmake (170662 => 170663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/cmake/FindGTK3.cmake        2014-07-01 20:38:37 UTC (rev 170662)
+++ trunk/Source/cmake/FindGTK3.cmake        2014-07-01 20:45:47 UTC (rev 170663)
</span><span class="lines">@@ -45,5 +45,19 @@
</span><span class="cx">     endif ()
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><ins>+if (GTK3_VERSION AND VERSION_OK AND ENABLE_X11_TARGET)
+    pkg_check_modules(GTK3_X11 gtk+-x11-3.0)
+    if (NOT(&quot;${GTK3_X11_VERSION}&quot; VERSION_EQUAL &quot;${GTK3_VERSION}&quot;))
+        set(VERSION_OK FALSE)
+    endif ()
+endif ()
+
+if (GTK3_VERSION AND VERSION_OK AND ENABLE_WAYLAND_TARGET)
+    pkg_check_modules(GTK3_WAYLAND gtk+-wayland-3.0)
+    if (NOT(&quot;${GTK3_WAYLAND_VERSION}&quot; VERSION_EQUAL &quot;${GTK3_VERSION}&quot;))
+        set(VERSION_OK FALSE)
+    endif ()
+endif ()
+
</ins><span class="cx"> include(FindPackageHandleStandardArgs)
</span><span class="cx"> FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK3 DEFAULT_MSG GTK3_INCLUDE_DIRS GTK3_LIBRARIES VERSION_OK)
</span></span></pre></div>
<a id="trunkSourcecmakeOptionsCommoncmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/cmake/OptionsCommon.cmake (170662 => 170663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/cmake/OptionsCommon.cmake        2014-07-01 20:38:37 UTC (rev 170662)
+++ trunk/Source/cmake/OptionsCommon.cmake        2014-07-01 20:45:47 UTC (rev 170663)
</span><span class="lines">@@ -1,10 +1,6 @@
</span><span class="cx"> add_definitions(-DBUILDING_WITH_CMAKE=1)
</span><span class="cx"> add_definitions(-DHAVE_CONFIG_H=1)
</span><span class="cx"> 
</span><del>-if (WTF_OS_UNIX)
-    add_definitions(-DXP_UNIX)
-endif (WTF_OS_UNIX)
-
</del><span class="cx"> # CODE_GENERATOR_PREPROCESSOR_WITH_LINEMARKERS only matters with GCC &gt;= 4.7.0.  Since this
</span><span class="cx"> # version, -P does not output empty lines, which currently breaks make_names.pl in
</span><span class="cx"> # WebCore. Investigating whether make_names.pl should be changed instead is left as an exercise to
</span></span></pre></div>
<a id="trunkSourcecmakeOptionsEflcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/cmake/OptionsEfl.cmake (170662 => 170663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/cmake/OptionsEfl.cmake        2014-07-01 20:38:37 UTC (rev 170662)
+++ trunk/Source/cmake/OptionsEfl.cmake        2014-07-01 20:45:47 UTC (rev 170663)
</span><span class="lines">@@ -167,6 +167,11 @@
</span><span class="cx">     set(ENABLE_PLUGIN_PROCESS 1)
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><ins>+if (WTF_OS_UNIX)
+    set(ENABLE_X11_TARGET ON)
+    add_definitions(-DXP_UNIX)
+endif (WTF_OS_UNIX)
+
</ins><span class="cx"> if (ENABLE_BATTERY_STATUS OR (EFL_REQUIRED_VERSION VERSION_LESS 1.8))
</span><span class="cx">     find_package(DBus REQUIRED)
</span><span class="cx">     find_package(E_DBus 1.7 COMPONENTS EUKit)
</span></span></pre></div>
<a id="trunkSourcecmakeOptionsGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/cmake/OptionsGTK.cmake (170662 => 170663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/cmake/OptionsGTK.cmake        2014-07-01 20:38:37 UTC (rev 170662)
+++ trunk/Source/cmake/OptionsGTK.cmake        2014-07-01 20:45:47 UTC (rev 170663)
</span><span class="lines">@@ -66,6 +66,21 @@
</span><span class="cx"> WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETWORK_PROCESS ON)
</span><span class="cx"> WEBKIT_OPTION_DEFAULT_PORT_VALUE(WTF_USE_TILED_BACKING_STORE OFF)
</span><span class="cx"> 
</span><ins>+set(ENABLE_X11_TARGET ON CACHE BOOL &quot;Whether to enable support for the X11 windowing target.&quot;)
+set(ENABLE_WAYLAND_TARGET OFF CACHE BOOL &quot;Whether to enable support for the Wayland windowing target.&quot;)
+
+if (ENABLE_X11_TARGET)
+    add_definitions(-DWTF_PLATFORM_X11=1)
+    add_definitions(-DMOZ_X11=1)
+    if (WTF_OS_UNIX)
+        add_definitions(-DXP_UNIX)
+    endif ()
+endif ()
+
+if (ENABLE_WAYLAND_TARGET)
+    add_definitions(-DWTF_PLATFORM_WAYLAND=1)
+endif ()
+
</ins><span class="cx"> # FIXME: Perhaps we need a more generic way of defining dependencies between features.
</span><span class="cx"> # VIDEO_TRACK depends on VIDEO.
</span><span class="cx"> if (NOT ENABLE_VIDEO AND ENABLE_VIDEO_TRACK)
</span><span class="lines">@@ -142,10 +157,6 @@
</span><span class="cx">     endif ()
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><del>-# FIXME: These need to be configurable.
-add_definitions(-DWTF_PLATFORM_X11=1)
-add_definitions(-DMOZ_X11)
-
</del><span class="cx"> find_package(Cairo 1.10.2 REQUIRED)
</span><span class="cx"> find_package(Fontconfig 2.8.0 REQUIRED)
</span><span class="cx"> find_package(Freetype2 2.4.2 REQUIRED)
</span><span class="lines">@@ -166,8 +177,14 @@
</span><span class="cx"> find_package(ATSPI 2.5.3)
</span><span class="cx"> find_package(GObjectIntrospection)
</span><span class="cx"> 
</span><del>-find_package(GTK3 3.6.0 REQUIRED)
-find_package(GDK3 3.6.0 REQUIRED)
</del><ins>+if (ENABLE_WAYLAND_TARGET)
+    set(GTK3_REQUIRED_VERSION 3.12.0)
+else ()
+    set(GTK3_REQUIRED_VERSION 3.6.0)
+endif ()
+
+find_package(GTK3 ${GTK3_REQUIRED_VERSION} REQUIRED)
+find_package(GDK3 ${GTK3_REQUIRED_VERSION} REQUIRED)
</ins><span class="cx"> set(GTK_LIBRARIES ${GTK3_LIBRARIES})
</span><span class="cx"> set(GTK_INCLUDE_DIRS ${GTK3_INCLUDE_DIRS})
</span><span class="cx"> set(GDK_LIBRARIES ${GDK3_LIBRARIES})
</span><span class="lines">@@ -205,12 +222,18 @@
</span><span class="cx"> # CMakePushCheckState can be used. We need to have OPENGL_INCLUDE_DIR as part
</span><span class="cx"> # of the directories check_include_files() looks for in case OpenGL is
</span><span class="cx"> # installed into a non-standard location.
</span><del>-set(REQUIRED_INCLUDES_OLD ${CMAKE_REQUIRED_INCLUDES})
-set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${OPENGL_INCLUDE_DIR})
-# We don't use find_package for GLX because it is part of -lGL, unlike EGL.
-check_include_files(&quot;GL/glx.h&quot; GLX_FOUND)
-set(CMAKE_REQUIRED_INCLUDES ${REQUIRED_INCLUDES_OLD})
</del><ins>+if (ENABLE_X11_TARGET)
+    set(REQUIRED_INCLUDES_OLD ${CMAKE_REQUIRED_INCLUDES})
+    set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${OPENGL_INCLUDE_DIR})
+    # We don't use find_package for GLX because it is part of -lGL, unlike EGL.
+    check_include_files(&quot;GL/glx.h&quot; GLX_FOUND)
+    set(CMAKE_REQUIRED_INCLUDES ${REQUIRED_INCLUDES_OLD})
</ins><span class="cx"> 
</span><ins>+    if (GLX_FOUND)
+        set(WTF_USE_GLX 1)
+    endif ()
+endif ()
+
</ins><span class="cx"> find_package(EGL)
</span><span class="cx"> if (EGL_FOUND)
</span><span class="cx">     set(WTF_USE_EGL 1)
</span></span></pre></div>
<a id="trunkToolsCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Tools/CMakeLists.txt (170662 => 170663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/CMakeLists.txt        2014-07-01 20:38:37 UTC (rev 170662)
+++ trunk/Tools/CMakeLists.txt        2014-07-01 20:45:47 UTC (rev 170663)
</span><span class="lines">@@ -13,7 +13,9 @@
</span><span class="cx">         add_subdirectory(MiniBrowser/gtk)
</span><span class="cx">         add_subdirectory(TestWebKitAPI/Tests/WebKit2Gtk)
</span><span class="cx">     endif ()
</span><del>-    add_subdirectory(DumpRenderTree/TestNetscapePlugIn)
</del><ins>+    if (ENABLE_X11_TARGET)
+        add_subdirectory(DumpRenderTree/TestNetscapePlugIn)
+    endif ()
</ins><span class="cx"> elseif (&quot;${PORT}&quot; STREQUAL &quot;WinCE&quot;)
</span><span class="cx">     add_subdirectory(WinCELauncher)
</span><span class="cx"> endif ()
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (170662 => 170663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-07-01 20:38:37 UTC (rev 170662)
+++ trunk/Tools/ChangeLog        2014-07-01 20:45:47 UTC (rev 170663)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-07-01  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
+
+        [CMake] Add necessary support for building for the Wayland target
+        https://bugs.webkit.org/show_bug.cgi?id=134160
+
+        Reviewed by Darin Adler.
+
+        * CMakeLists.txt: Only build the TestNetscapePlugIn target in case
+        the X11 windowing target is enabled.
+
</ins><span class="cx"> 2014-07-01  Chris Fleizach  &lt;cfleizach@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         AX: HTML indeterminate IDL attribute not mapped to checkbox value=2
</span></span></pre>
</div>
</div>

</body>
</html>