Allow Page to open window for tizen applications
[platform/framework/web/crosswalk-tizen.git] / wrt.gyp
1 {
2   'includes': [
3     'filenames.gypi',
4     'vendor/native_mate/native_mate_files.gypi',
5   ],
6   'targets': [
7     {
8       'target_name': 'wrt',
9       'type': 'executable',
10       'dependencies': [
11         '<(DEPTH)/electron.gyp:js2asar',
12         '<(DEPTH)/electron.gyp:app2asar',
13         'wrt_lib',
14         'wrt-service',
15         '<(DEPTH)/tizen/common/common.gyp:wrt_common',
16         '<(DEPTH)/tizen/loader/loader.gyp:wrt-loader',
17         '<(DEPTH)/tizen/renderer/injected_bundle.gyp:xwalk_injected_bundle',
18         '<(DEPTH)/efl/build/system.gyp:ecore',
19         '<(DEPTH)/efl/build/system.gyp:launchpad',
20         '<(DEPTH)/efl/build/system.gyp:capi-appfw-application',
21         '<(DEPTH)/efl/build/system.gyp:capi-system-device',
22         '<(DEPTH)/efl/build/system.gyp:elementary',
23         '<(DEPTH)/efl/build/system.gyp:tts',
24         'electron_shell_copy',
25       ],
26       'sources': [
27         'tizen/src/wrt_main.cc',
28         'tizen/src/wrt_main.h',
29         'tizen/loader/prelauncher.h',
30         'tizen/loader/prelauncher.cc',
31       ],
32       'include_dirs': [
33         'tizen/src',
34       ],
35       'includes': [
36         'tizen/build/common.gypi',
37       ],
38       'ldflags': [
39         '-pie',
40         '-export-dynamic',
41       ],
42       'cflags': [ '-fPIC' ],
43       'cflags_cc': [ '-fPIC' ],
44       'copies': [
45         {
46           'destination': '<(SHARED_INTERMEDIATE_DIR)',
47           'files': [
48             'tizen/pwrt_env.sh',
49           ],
50         },
51       ],
52     },  # target wrt
53     {
54       'target_name': 'wrt-service',
55       'type': 'executable',
56       'dependencies': [
57         'wrt_lib',
58         '<(DEPTH)/efl/build/system.gyp:capi-appfw-application',
59         '<(DEPTH)/efl/build/system.gyp:capi-system-device',
60         '<(DEPTH)/tizen/common/common.gyp:wrt_common',
61       ],
62       'sources': [
63         'tizen/src/app/service_main.cc',
64       ],
65       'include_dirs': [
66         'tizen/src',
67       ],
68       'includes': [
69         'tizen/build/common.gypi',
70       ],
71     },  # target wrt-service
72     {
73       'target_name': 'wrt_lib',
74       'type': 'static_library',
75       'dependencies': [
76         '<(DEPTH)/tizen/extensions/extensions.gyp:xwalk_extension_shared',
77         'electron.gyp:atom_js2c',
78         'vendor/pdf_viewer/pdf_viewer.gyp:pdf_viewer',
79         'vendor/brightray/brightray.gyp:brightray',
80         'vendor/node/node.gyp:node',
81       ],
82       'defines': [
83         # We need to access internal implementations of Node.
84         'NODE_WANT_INTERNALS=1',
85         'NODE_SHARED_MODE',
86         # This is defined in skia/skia_common.gypi.
87         'SK_SUPPORT_LEGACY_GETTOPDEVICE',
88         # Disable warnings for g_settings_list_schemas.
89         'GLIB_DISABLE_DEPRECATION_WARNINGS',
90         # Defined in Chromium but not exposed in its gyp file.
91         'V8_USE_EXTERNAL_STARTUP_DATA',
92         'V8_SHARED',
93         'USING_V8_SHARED',
94         'USING_V8_PLATFORM_SHARED',
95         'USING_V8_BASE_SHARED',
96         # Remove this after enable_plugins becomes a feature flag.
97         'ENABLE_PLUGINS',
98         'USE_PROPRIETARY_CODECS',
99         'ATOM_PRODUCT_NAME="WRT"',
100         'ATOM_PROJECT_NAME="WRT"',
101         'USE_SYSTEM_ICU',
102       ],
103       'sources': [
104         '<@(lib_sources)',
105         'atom/app/runtime.cc',
106         'atom/app/runtime.h',
107         'atom/app/ui_runtime.cc',
108         'atom/app/ui_runtime.h',
109         'atom/app/watch_runtime.cc',
110         'atom/app/watch_runtime.h',
111         'atom/browser/api/atom_api_menu_efl.cc',
112         'atom/browser/api/atom_api_menu_efl.h',
113         'atom/browser/api/atom_api_web_contents_efl.cc',
114         'atom/browser/common_web_contents_delegate_efl.cc',
115         'atom/browser/native_browser_view_efl.cc',
116         'atom/browser/native_browser_view_efl.h',
117         'atom/browser/native_window_efl.cc',
118         'atom/browser/native_window_efl.h',
119         'atom/browser/splash_screen.h',
120         'atom/browser/splash_screen.cc',
121         'atom/browser/ui/accelerator_util_efl.cc',
122         'atom/browser/ui/drag_util_efl.cc',
123         'atom/browser/ui/file_dialog_efl.cc',
124         'atom/browser/ui/message_box_efl.cc',
125         'atom/browser/ui/tray_icon_efl.cc',
126         'atom/browser/ui/tray_icon_efl.h',
127         'chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.cc',
128         'chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.h',
129         'chromium_src/chrome/browser/icon_loader_efllinux.cc',
130         'tizen/src/app/wrt_main_delegate.cc',
131         'tizen/src/app/wrt_main_delegate.h',
132         'tizen/src/browser/api/wrt_api_core.cc',
133         'tizen/src/browser/api/wrt_api_core.h',
134         'tizen/src/browser/native_web_runtime.cc',
135         'tizen/src/browser/native_web_runtime.h',
136         'tizen/src/browser/native_web_runtime_observer.h',
137         'tizen/src/browser/popup.cc',
138         'tizen/src/browser/popup.h',
139         'tizen/src/browser/popup_string.cc',
140         'tizen/src/browser/popup_string.h',
141         'tizen/src/browser/wrt_ipc.cc',
142         'tizen/src/browser/wrt_ipc.h',
143         'tizen/src/browser/wrt_service.cc',
144         'tizen/src/browser/wrt_service.h',
145         'tizen/browser/tizen_browser_parts.cc',
146         'tizen/browser/tizen_browser_parts.h',
147         'tizen/browser/vibration_manager.cc',
148         'tizen/browser/vibration_manager.h',
149       ],
150       'sources/': [
151         # chromium-efl supports only tizen webrtc using CAPI
152         # which is not working on desktop linux.
153         ['exclude', 'atom/browser/api/atom_api_desktop_capturer.cc'],
154         ['exclude', 'atom/browser/api/atom_api_desktop_capturer.h'],
155       ],
156       'include_dirs': [
157         '.',
158         'tizen',
159         'chromium_src',
160         'vendor/brightray',
161         'vendor/native_mate',
162         # Include atom_natives.h.
163         '<(SHARED_INTERMEDIATE_DIR)',
164         # Include directories for uv and node.
165         'vendor/node/src',
166         'vendor/node/deps/http_parser',
167         'vendor/node/deps/uv/include',
168         # The `node.h` is using `#include"v8.h"`.
169         '<(libchromiumcontent_src_dir)/v8/include',
170         # The `node.h` is using `#include"ares.h"`.
171         'vendor/node/deps/cares/include',
172         # The `third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h` is using `platform/PlatformExport.h`.
173         '<(libchromiumcontent_src_dir)/third_party/WebKit/Source',
174         # The 'third_party/libyuv/include/libyuv/scale_argb.h' is using 'libyuv/basic_types.h'.
175         '<(libchromiumcontent_src_dir)/third_party/libyuv/include',
176         # The 'third_party/webrtc/modules/desktop_capture/desktop_frame.h' is using 'webrtc/base/scoped_ptr.h'.
177         '<(libchromiumcontent_src_dir)/third_party/',
178         '<(libchromiumcontent_src_dir)/components/cdm',
179         '<(libchromiumcontent_src_dir)/third_party/widevine',
180         '<(libchromiumcontent_src_dir)/tizen_src/chromium_impl',
181         '<(libchromiumcontent_src_dir)/tizen_src/ewk/efl_integration',
182       ],
183       'direct_dependent_settings': {
184         'include_dirs': [
185           '.',
186         ],
187       },
188       'export_dependent_settings': [
189         'vendor/brightray/brightray.gyp:brightray',
190       ],
191       'conditions': [
192         ['libchromiumcontent_component', {
193           'link_settings': {
194             'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
195           },
196         }],
197         ['OS=="linux"', {
198           'sources': [
199             '<@(lib_sources_linux)',
200             '<@(lib_sources_nss)',
201           ],
202           'link_settings': {
203           },
204           # Required settings of using breakpad.
205           'cflags_cc': [
206             '-Wno-empty-body',
207             '-Wno-reserved-user-defined-literal',
208           ],
209           'include_dirs': [
210             'vendor/breakpad/src',
211           ],
212           'dependencies': [
213             'vendor/breakpad/breakpad.gyp:breakpad_client',
214           ],
215         }],  # OS=="linux"
216         ['is_tizen==1', {
217           'cflags': [ '-fPIC' ],
218           'cflags_cc': [ '-fPIC' ],
219           'dependencies': [
220             '<(DEPTH)/efl/build/system.gyp:appcore-watch',
221             '<(DEPTH)/efl/build/system.gyp:capi-appfw-application',
222             '<(DEPTH)/efl/build/system.gyp:capi-appfw-watch-application',
223             '<(DEPTH)/efl/build/system.gyp:efl-extension',
224             '<(DEPTH)/efl/build/system.gyp:elementary',
225             '<(DEPTH)/efl/build/system.gyp:evas',
226             '<(DEPTH)/efl/build/system.gyp:icu',
227           ],
228         }, {
229           'dependencies': [
230             '<(DEPTH)/efl/build/system.gyp:ecore-x',
231             '<(DEPTH)/efl/build/system.gyp:elocation',
232             '<(DEPTH)/efl/build/system.gyp:elementary',
233             '<(DEPTH)/efl/build/system.gyp:evas',
234             '<(DEPTH)/efl/build/system.gyp:icu',
235           ],
236         }],
237         ['tizen_product_tv==1', {
238           'sources!': [
239             'atom/app/watch_runtime.cc',
240             'atom/app/watch_runtime.h',
241           ],
242           'dependencies!': [
243             '<(DEPTH)/efl/build/system.gyp:appcore-watch',
244             '<(DEPTH)/efl/build/system.gyp:capi-appfw-watch-application',
245           ],
246           'dependencies': [
247             # `media_player_efl.h` internally includes `player.h`.
248             '<(DEPTH)/efl/build/system.gyp:capi-media-player',
249             '<(DEPTH)/efl/build/system.gyp:vd-win-util',
250           ],
251         }],
252       ],
253     },  # target wrt_lib
254     {
255       'target_name': 'electron_shell_copy',
256       'type': 'none',
257       'copies': [
258         {
259           'destination': '<(PRODUCT_DIR)',
260           'files': [
261             '<(DEPTH)/efl/build/desktop/electron.sh',
262             '<(DEPTH)/efl/build/desktop/launch.sh',
263           ],
264         },
265       ],
266     },  # target electron_shell_copy
267   ],
268 }