- add sources.
[platform/framework/web/crosswalk.git] / src / rlz / rlz.gyp
1 # Copyright (c) 2012 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     'chromium_code': 1,
8     'variables': {
9       # Force rlz to use chrome's networking stack.
10       'force_rlz_use_chrome_net%': 1,
11     },
12     'conditions': [
13       ['force_rlz_use_chrome_net or OS!="win"', {
14         'rlz_use_chrome_net%': 1,
15       }, {
16         'rlz_use_chrome_net%': 0,
17       }],
18     ],
19   },
20   'target_defaults': {
21     'include_dirs': [
22       '..',
23     ],
24   },
25   'targets': [
26     {
27       'target_name': 'rlz_lib',
28       'type': 'static_library',
29       'dependencies': [
30         '../base/base.gyp:base',
31         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
32       ],
33       'sources': [
34         'chromeos/lib/machine_id_chromeos.cc',
35         'chromeos/lib/rlz_value_store_chromeos.cc',
36         'chromeos/lib/rlz_value_store_chromeos.h',
37         'ios/lib/machine_id_ios.cc',
38         'lib/assert.cc',
39         'lib/assert.h',
40         'lib/crc32.h',
41         'lib/crc32_wrapper.cc',
42         'lib/crc8.h',
43         'lib/crc8.cc',
44         'lib/financial_ping.cc',
45         'lib/financial_ping.h',
46         'lib/lib_values.cc',
47         'lib/machine_id.cc',
48         'lib/machine_id.h',
49         'lib/recursive_cross_process_lock_posix.cc',
50         'lib/recursive_cross_process_lock_posix.h',
51         'lib/rlz_enums.h',
52         'lib/rlz_lib.cc',
53         'lib/rlz_lib.h',
54         'lib/rlz_lib_clear.cc',
55         'lib/lib_values.h',
56         'lib/rlz_value_store.h',
57         'lib/string_utils.cc',
58         'lib/string_utils.h',
59         'mac/lib/machine_id_mac.cc',
60         'mac/lib/rlz_value_store_mac.mm',
61         'mac/lib/rlz_value_store_mac.h',
62         'win/lib/lib_mutex.cc',
63         'win/lib/lib_mutex.h',
64         'win/lib/machine_deal.cc',
65         'win/lib/machine_deal.h',
66         'win/lib/machine_id_win.cc',
67         'win/lib/process_info.cc',
68         'win/lib/process_info.h',
69         'win/lib/registry_util.cc',
70         'win/lib/registry_util.h',
71         'win/lib/rlz_lib.h',
72         'win/lib/rlz_lib_win.cc',
73         'win/lib/rlz_value_store_registry.cc',
74         'win/lib/rlz_value_store_registry.h',
75       ],
76       'conditions': [
77         ['rlz_use_chrome_net==1', {
78           'defines': [
79             'RLZ_NETWORK_IMPLEMENTATION_CHROME_NET',
80           ],
81           'direct_dependent_settings': {
82             'defines': [
83               'RLZ_NETWORK_IMPLEMENTATION_CHROME_NET',
84             ],
85           },
86           'dependencies': [
87             '../net/net.gyp:net',
88             '../url/url.gyp:url_lib',
89           ],
90         }, {
91           'defines': [
92             'RLZ_NETWORK_IMPLEMENTATION_WIN_INET',
93           ],
94           'direct_dependent_settings': {
95             'defines': [
96               'RLZ_NETWORK_IMPLEMENTATION_WIN_INET',
97             ],
98           },
99         }],
100       ],
101       'target_conditions': [
102         # Need 'target_conditions' to override default filename_rules to include
103         # the files on iOS.
104         ['OS=="ios"', {
105           'sources/': [
106             ['include', '^mac/lib/rlz_value_store_mac\\.'],
107           ],
108         }],
109       ],
110       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
111       'msvs_disabled_warnings': [ 4267, ],
112     },
113     {
114       'target_name': 'rlz_unittests',
115       'type': 'executable',
116       'dependencies': [
117         ':rlz_lib',
118         '../base/base.gyp:base',
119         '../base/base.gyp:base_prefs',
120         '../testing/gmock.gyp:gmock',
121         '../testing/gtest.gyp:gtest',
122         '../third_party/zlib/zlib.gyp:zlib',
123       ],
124       'sources': [
125         'lib/crc32_unittest.cc',
126         'lib/crc8_unittest.cc',
127         'lib/financial_ping_test.cc',
128         'lib/lib_values_unittest.cc',
129         'lib/machine_id_unittest.cc',
130         'lib/rlz_lib_test.cc',
131         'lib/string_utils_unittest.cc',
132         'test/rlz_test_helpers.cc',
133         'test/rlz_test_helpers.h',
134         'test/rlz_unittest_main.cc',
135         'win/lib/machine_deal_test.cc',
136       ],
137       'conditions': [
138         ['rlz_use_chrome_net==1', {
139           'dependencies': [
140             '../net/net.gyp:net_test_support',
141           ],
142         }],
143       ],
144       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
145       'msvs_disabled_warnings': [ 4267, ],
146     },
147     {
148       'target_name': 'rlz_id',
149       'type': 'executable',
150       'dependencies': [
151         ':rlz_lib',
152       ],
153       'sources': [
154         'examples/rlz_id.cc',
155       ],
156     },
157   ],
158   'conditions': [
159     ['OS=="win"', {
160       'targets': [
161         {
162           'target_name': 'rlz',
163           'type': 'shared_library',
164           'sources': [
165             'win/dll/dll_main.cc',
166             'win/dll/exports.cc',
167           ],
168           'dependencies': [
169             ':rlz_lib',
170             '../third_party/zlib/zlib.gyp:zlib',
171           ],
172         },
173       ],
174     }],
175   ],
176 }