Bug 134160

Summary: [CMake] Add necessary support for building for the Wayland target
Product: WebKit Reporter: Zan Dobersek <zan>
Component: New BugsAssignee: Zan Dobersek <zan>
Status: RESOLVED FIXED    
Severity: Normal CC: bunhere, commit-queue, gyuyoung.kim, mrobinson, rakuco, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 115803    
Attachments:
Description Flags
Patch
none
Patch darin: review+

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>