Upstream version 7.35.139.0
[platform/framework/web/crosswalk.git] / src / ozone / wayland / wayland.gyp
1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Copyright 2013 Intel Corporation. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 {
7   'variables': {
8     'variables':  {
9       'enable_ozone_wayland_vkb%': 0,
10       'enable_xdg_shell%': 0,
11     },
12     'enable_ozone_wayland_vkb%': '<(enable_ozone_wayland_vkb)',
13     'enable_xdg_shell%': '<(enable_xdg_shell)',
14     'conditions': [
15       ['sysroot!=""', {
16         'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
17       }, {
18         'pkg-config': 'pkg-config'
19       }],
20     ],
21   },
22
23   'targets': [
24     {
25       'target_name': 'wayland_toolkit',
26       'type': 'static_library',
27       'variables': {
28         'WAYLAND_VERSION': '1.2.0',
29         'MESA_VERSION': '9.1.3',
30         'wayland_packages': [
31           'egl >= <(MESA_VERSION)',
32           'wayland-client >= <(WAYLAND_VERSION)',
33           'wayland-cursor >= <(WAYLAND_VERSION)',
34           'wayland-egl >= <(MESA_VERSION)',
35           'xkbcommon',
36         ],
37       },
38       'cflags': [
39         '<!@(<(pkg-config) --cflags <(wayland_packages))',
40       ],
41       'direct_dependent_settings': {
42         'cflags': [
43           '<!@(<(pkg-config) --cflags <(wayland_packages))',
44         ],
45       },
46       'link_settings': {
47         'ldflags': [
48           '<!@(<(pkg-config) --libs-only-L --libs-only-other <(wayland_packages))',
49         ],
50         'libraries': [
51           '<!@(<(pkg-config) --libs-only-l <(wayland_packages))',
52         ],
53       },
54       'dependencies': [
55         '../../base/base.gyp:base',
56       ],
57       'include_dirs': [
58         '../..',
59         '<(DEPTH)/third_party/khronos',
60       ],
61       'sources': [
62         'display.cc',
63         'display.h',
64         'display_poll_thread.cc',
65         'display_poll_thread.h',
66         'input_device.cc',
67         'input_device.h',
68         'ozone_hardware_display.h',
69         'ozone_hardware_display.cc',
70         'screen.cc',
71         'screen.h',
72         'window.cc',
73         'window.h',
74         'egl/egl_window.cc',
75         'egl/egl_window.h',
76         'input/cursor.cc',
77         'input/cursor.h',
78         'input/keyboard.cc',
79         'input/keyboard.h',
80         'input/keyboard_engine_xkb.h',
81         'input/keyboard_engine_xkb.cc',
82         'input/pointer.cc',
83         'input/pointer.h',
84         'input/text_input.h',
85         'input/text_input.cc',
86         'input/text-protocol.c',
87         'input/text-client-protocol.h',
88         'input/touchscreen.cc',
89         'input/touchscreen.h',
90         'shell/shell.cc',
91         'shell/shell.h',
92         'shell/shell_surface.h',
93         'shell/shell_surface.cc',
94         'shell/wl_shell_surface.cc',
95         'shell/wl_shell_surface.h',
96       ],
97       'conditions': [
98         ['<(enable_ozone_wayland_vkb)==1', {
99           'defines': [
100             'ENABLE_OZONE_WAYLAND_VKB',
101           ],
102         }],
103         ['<(enable_xdg_shell)==1', {
104           'defines': [
105             'ENABLE_XDG_SHELL',
106           ],
107           'sources': [
108             'shell/xdg_shell_surface.cc',
109             'shell/xdg_shell_surface.h',
110             'shell/xdg-shell-protocol.c',
111             'shell/xdg-shell-client-protocol.h',
112           ],
113         }],
114       ],
115     },
116   ]
117 }