Upstream version 11.40.277.0
[platform/framework/web/crosswalk.git] / src / components / sessions.gypi
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 {
6   'variables': {
7     # Core sources shared by sessions_content and sessions_ios.
8     #
9     # TODO(rohitrao): We are including these sources directly into each
10     # individual target in order to avoid the complications associated with
11     # making a separate sessions_core target.  The files in sessions/core
12     # declare a static function that they do not define, which means that a
13     # sessions_core target would not link as a shared_library.  It would also be
14     # unsuitable as a static_library because it would be linked into multiple
15     # shared libraries.  Revisit this setup if necessary.
16     'sessions_core_sources': [
17       'sessions/core/serialized_navigation_driver.h',
18       'sessions/serialized_navigation_entry.cc',
19       'sessions/serialized_navigation_entry.h',
20       'sessions/session_id.cc',
21       'sessions/session_id.h',
22     ],
23   },
24   'targets': [
25     {
26       # GN version: //components/sessions:test_support
27       'target_name': 'sessions_test_support',
28       'type': 'static_library',
29       'defines!': ['SESSIONS_IMPLEMENTATION'],
30       'dependencies': [
31         '../skia/skia.gyp:skia',
32         '../testing/gtest.gyp:gtest',
33       ],
34       'include_dirs': [
35         '..',
36       ],
37       'sources': [
38         # Note: sources list duplicated in GN build.
39         'sessions/serialized_navigation_entry_test_helper.cc',
40         'sessions/serialized_navigation_entry_test_helper.h',
41       ],
42       'conditions': [
43         ['android_webview_build == 0', {
44           'dependencies': [
45              '../sync/sync.gyp:sync',
46           ]
47         }],
48       ],
49     },
50   ],
51
52   # Platform-specific targets.
53   'conditions': [
54     ['OS!="ios"', {
55       'targets': [
56         {
57           # GN version: //components/sessions:sessions_content
58           'target_name': 'sessions_content',
59           'type': '<(component)',
60           'dependencies': [
61             '../base/base.gyp:base',
62             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
63             '../content/content.gyp:content_browser',
64             '../skia/skia.gyp:skia',
65             '../third_party/protobuf/protobuf.gyp:protobuf_lite',
66             '../ui/base/ui_base.gyp:ui_base',
67             '../url/url.gyp:url_lib',
68           ],
69           'include_dirs': [
70             '..',
71           ],
72           'defines': [
73             'SESSIONS_IMPLEMENTATION',
74           ],
75           'sources': [
76             # Note: sources list duplicated in GN build.
77             '<@(sessions_core_sources)',
78
79             'sessions/content/content_serialized_navigation_builder.cc',
80             'sessions/content/content_serialized_navigation_builder.h',
81             'sessions/content/content_serialized_navigation_driver.cc',
82             'sessions/content/content_serialized_navigation_driver.h',
83           ],
84           'conditions': [
85             ['android_webview_build == 0', {
86               'dependencies': [
87                  '../sync/sync.gyp:sync',
88               ]
89             }],
90           ],
91         },
92       ],
93     }, {  # OS==ios
94       'targets': [
95         {
96           'target_name': 'sessions_ios',
97           'type': 'static_library',
98           'dependencies': [
99             '../base/base.gyp:base',
100             '../ios/web/ios_web.gyp:ios_web',
101             '../sync/sync.gyp:sync',
102             '../third_party/protobuf/protobuf.gyp:protobuf_lite',
103             '../ui/base/ui_base.gyp:ui_base',
104             '../url/url.gyp:url_lib',
105           ],
106           'include_dirs': [
107             '..',
108           ],
109           'defines': [
110             'SESSIONS_IMPLEMENTATION',
111           ],
112           'sources': [
113             '<@(sessions_core_sources)',
114
115             'sessions/ios/ios_serialized_navigation_builder.cc',
116             'sessions/ios/ios_serialized_navigation_builder.h',
117             'sessions/ios/ios_serialized_navigation_driver.cc',
118             'sessions/ios/ios_serialized_navigation_driver.h',
119           ],
120         },
121       ],
122     }],
123   ],
124
125 }