Bug 143304 - [CMake][GTK] Use the right variable to include the Wayland headers.
Summary: [CMake][GTK] Use the right variable to include the Wayland headers.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-01 06:12 PDT by Carlos Alberto Lopez Perez
Modified: 2015-04-01 07:31 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.24 KB, patch)
2015-04-01 06:18 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2015-04-01 06:12:52 PDT
The find_package command (as used in FindWayland.cmake) will define a number of variables if the package has been found:

    <NAME>_FOUND
    <NAME>_INCLUDE_DIRS or <NAME>_INCLUDES
    <NAME>_LIBRARIES or <NAME>_LIBRARIES or <NAME>_LIBS
    <NAME>_DEFINITIONS

All this takes place in the Find<name>.cmake file. http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries


However, when adding the path for the include directory for the wayland library, we are using WAYLAND_INCLUDE_DIRECTORIES which is undefined (empty) instead of WAYLAND_INCLUDE_DIRS.

Usually the wayland include directory is the standard system one (/usr/lib), that explains why this has been unnoticed so far. There is no need to include the system default include path.
Only when using a different include directory for the wayland headers this could break.

PS: Note how all the other includes for libraries are using the <NAME>_INCLUDE_DIRS variable

$ grep INCLUDE_DIRS Source/WebCore/PlatformGTK.cmake
Comment 1 Carlos Alberto Lopez Perez 2015-04-01 06:18:13 PDT
Created attachment 249916 [details]
Patch
Comment 2 Carlos Garcia Campos 2015-04-01 06:43:17 PDT
Comment on attachment 249916 [details]
Patch

Good catch!
Comment 3 WebKit Commit Bot 2015-04-01 07:31:07 PDT
Comment on attachment 249916 [details]
Patch

Clearing flags on attachment: 249916

Committed r182232: <http://trac.webkit.org/changeset/182232>
Comment 4 WebKit Commit Bot 2015-04-01 07:31:11 PDT
All reviewed patches have been landed.  Closing bug.