[M67 Dev][Product TV] Enable Cursor with ecore-wl2
[platform/framework/web/chromium-efl.git] / rlz / BUILD.gn
1 # Copyright 2014 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 # Note that this build file assumes rlz_use_chrome_net which is a condition in
6 # the GYP file, but is always true for Chrome builds.
7
8 import("//testing/test.gni")
9
10 config("rlz_config") {
11   defines = [ "RLZ_NETWORK_IMPLEMENTATION_CHROME_NET" ]
12 }
13
14 source_set("rlz_utils") {
15   sources = [
16     "lib/assert.cc",
17     "lib/assert.h",
18     "lib/crc32.h",
19     "lib/crc32_wrapper.cc",
20     "lib/lib_values.cc",
21     "lib/lib_values.h",
22     "lib/net_response_check.cc",
23     "lib/net_response_check.h",
24     "lib/rlz_api.h",
25     "lib/rlz_enums.h",
26     "lib/string_utils.cc",
27     "lib/string_utils.h",
28   ]
29
30   public_configs = [ ":rlz_config" ]
31
32   deps = [
33     "//base",
34     "//net",
35     "//third_party/zlib",
36     "//url",
37   ]
38 }
39
40 if (!is_android) {
41   source_set("rlz_lib") {
42     sources = [
43       "chromeos/lib/rlz_value_store_chromeos.cc",
44       "chromeos/lib/rlz_value_store_chromeos.h",
45       "ios/lib/machine_id_ios.cc",
46       "lib/crc8.cc",
47       "lib/crc8.h",
48       "lib/financial_ping.cc",
49       "lib/financial_ping.h",
50       "lib/machine_id.cc",
51       "lib/machine_id.h",
52       "lib/recursive_cross_process_lock_posix.cc",
53       "lib/recursive_cross_process_lock_posix.h",
54       "lib/rlz_lib.cc",
55       "lib/rlz_lib.h",
56       "lib/rlz_lib_clear.cc",
57       "lib/rlz_value_store.h",
58       "mac/lib/machine_id_mac.cc",
59       "mac/lib/rlz_value_store_mac.h",
60       "mac/lib/rlz_value_store_mac.mm",
61       "win/lib/lib_mutex.cc",
62       "win/lib/lib_mutex.h",
63       "win/lib/machine_deal.cc",
64       "win/lib/machine_deal.h",
65       "win/lib/machine_id_win.cc",
66       "win/lib/process_info.cc",
67       "win/lib/process_info.h",
68       "win/lib/registry_util.cc",
69       "win/lib/registry_util.h",
70       "win/lib/rlz_lib_win.cc",
71       "win/lib/rlz_value_store_registry.cc",
72       "win/lib/rlz_value_store_registry.h",
73     ]
74
75     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
76     configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
77
78     public_configs = [ ":rlz_config" ]
79
80     deps = [
81       ":rlz_utils",
82       "//base",
83       "//base/third_party/dynamic_annotations",
84       "//net",
85       "//url",
86     ]
87
88     if (is_chromeos) {
89       deps += [ "//chromeos" ]
90     }
91
92     if (is_mac) {
93       libs = [
94         "Foundation.framework",
95         "IOKit.framework",
96       ]
97     }
98
99     if (is_ios) {
100       # These _mac files are also used on iOS.
101       set_sources_assignment_filter([])
102       sources += [
103         "mac/lib/rlz_value_store_mac.h",
104         "mac/lib/rlz_value_store_mac.mm",
105       ]
106       set_sources_assignment_filter(sources_assignment_filter)
107     }
108   }
109
110   source_set("test_support") {
111     testonly = true
112     sources = [
113       "test/rlz_test_helpers.cc",
114       "test/rlz_test_helpers.h",
115     ]
116     deps = [
117       ":rlz_lib",
118       "//base",
119       "//base/test:test_support",
120       "//testing/gtest",
121     ]
122     if (is_chromeos) {
123       deps += [ "//chromeos" ]
124     }
125   }
126
127   test("rlz_unittests") {
128     sources = [
129       "lib/crc32_unittest.cc",
130       "lib/crc8_unittest.cc",
131       "lib/financial_ping_test.cc",
132       "lib/lib_values_unittest.cc",
133       "lib/machine_id_unittest.cc",
134       "lib/rlz_lib_test.cc",
135       "lib/string_utils_unittest.cc",
136       "test/rlz_unittest_main.cc",
137       "win/lib/machine_deal_test.cc",
138     ]
139
140     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
141     configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
142
143     deps = [
144       ":rlz_lib",
145       ":rlz_utils",
146       ":test_support",
147       "//base",
148       "//net:test_support",
149       "//testing/gmock",
150       "//testing/gtest",
151       "//third_party/zlib",
152     ]
153     if (is_chromeos) {
154       deps += [ "//chromeos" ]
155     }
156   }
157 }
158
159 if (!is_ios && !is_android) {
160   executable("rlz_id") {
161     sources = [
162       "examples/rlz_id.cc",
163     ]
164     deps = [
165       ":rlz_lib",
166       "//build/config:exe_and_shlib_deps",
167       "//build/win:default_exe_manifest",
168     ]
169   }
170 }
171
172 if (is_win) {
173   shared_library("rlz") {
174     sources = [
175       "win/dll/dll_main.cc",
176       "win/dll/exports.cc",
177     ]
178     deps = [
179       ":rlz_lib",
180       ":rlz_utils",
181       "//build/config:exe_and_shlib_deps",
182       "//third_party/zlib",
183     ]
184   }
185 }