Bug 134160 - [CMake] Add necessary support for building for the Wayland target
Summary: [CMake] Add necessary support for building for the Wayland target
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords:
Depends on:
Blocks: 115803
  Show dependency treegraph
 
Reported: 2014-06-21 11:19 PDT by Zan Dobersek
Modified: 2014-07-01 13:47 PDT (History)
6 users (show)

See Also:


Attachments
Patch (8.42 KB, patch)
2014-06-21 11:30 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch (8.44 KB, patch)
2014-06-23 12:17 PDT, Zan Dobersek
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2014-06-21 11:19:21 PDT
[CMake] Add necessary support for building for the Wayland target
Comment 1 Zan Dobersek 2014-06-21 11:30:40 PDT
Created attachment 233540 [details]
Patch
Comment 2 Martin Robinson 2014-06-21 15:24:07 PDT
Comment on attachment 233540 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=233540&action=review

> Source/cmake/OptionsGTK.cmake:74
> +if (NOT DEFINED ENABLE_X11_TARGET)
> +    set(ENABLE_X11_TARGET ON)
> +endif ()
> +
> +if (NOT DEFINED ENABLE_WAYLAND_TARGET)
> +    set(ENABLE_WAYLAND_TARGET OFF)
> +endif ()

I think if you make these cached variables you can just give them default values. See: http://www.cmake.org/cmake/help/v3.0/command/set.html
Comment 3 Zan Dobersek 2014-06-23 12:17:14 PDT
Created attachment 233624 [details]
Patch

Makes ENABLE_X11_TARGET and ENABLE_WAYLAND_TARGET cached variables.
Comment 4 Martin Robinson 2014-07-01 12:29:45 PDT
Comment on attachment 233624 [details]
Patch

Looks good to me, other than the add_definitions(-DWTF_USE_EGL=1) and add_definitions(-DWTF_USE_GLX=1) that we discussed via Jabber.
Comment 5 Zan Dobersek 2014-07-01 13:33:22 PDT
Comment on attachment 233624 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=233624&action=review

> Source/cmake/OptionsGTK.cmake:-241
> -
> -    if (EGL_FOUND)
> -        add_definitions(-DWTF_USE_EGL=1)
> -    endif ()
> -
> -    if (GLX_FOUND)
> -        add_definitions(-DWTF_USE_GLX=1)
> -    endif ()

I'll revert this change to preserve the current behavior where the two definitions rely on OpenGL dependency being present.
Comment 6 Zan Dobersek 2014-07-01 13:47:22 PDT
Committed r170663: <http://trac.webkit.org/changeset/170663>