1 # Copyright 2014 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
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.
8 import("//build/config/chromeos/ui_mode.gni")
9 import("//rlz/buildflags/buildflags.gni")
10 import("//testing/test.gni")
12 config("rlz_lib_config") {
13 defines = [ "RLZ_NETWORK_IMPLEMENTATION_CHROME_NET" ]
16 source_set("rlz_utils") {
21 "lib/crc32_wrapper.cc",
24 "lib/net_response_check.cc",
25 "lib/net_response_check.h",
28 "lib/string_utils.cc",
32 public_deps = [ "//base" ]
35 "//build:chromeos_buildflags",
40 if (enable_rlz_support) {
41 source_set("rlz_lib_no_network") {
45 "lib/machine_deal_win.h",
48 "lib/rlz_lib_clear.cc",
49 "lib/rlz_lib_clear.h",
50 "lib/rlz_value_store.h",
51 "lib/supplementary_branding.cc",
52 "lib/supplementary_branding.h",
58 "lib/time_util_win.cc",
59 "win/lib/lib_mutex.cc",
60 "win/lib/lib_mutex.h",
61 "win/lib/machine_deal.cc",
62 "win/lib/machine_deal.h",
63 "win/lib/machine_id_win.cc",
64 "win/lib/process_info.cc",
65 "win/lib/process_info.h",
66 "win/lib/registry_util.cc",
67 "win/lib/registry_util.h",
68 "win/lib/rlz_lib_win.cc",
69 "win/lib/rlz_value_store_registry.cc",
70 "win/lib/rlz_value_store_registry.h",
73 sources += [ "lib/time_util_base.cc" ]
79 "//build:chromeos_buildflags",
82 if (is_chromeos_ash) {
84 "chromeos/lib/rlz_value_store_chromeos.cc",
85 "chromeos/lib/rlz_value_store_chromeos.h",
88 "//chromeos/ash/components/dbus",
89 "//chromeos/ash/components/dbus/debug_daemon",
90 "//chromeos/ash/components/system",
96 "mac/lib/rlz_value_store_mac.h",
97 "mac/lib/rlz_value_store_mac.mm",
100 frameworks = [ "Foundation.framework" ]
103 sources += [ "mac/lib/machine_id_mac.cc" ]
104 frameworks += [ "IOKit.framework" ]
108 sources += [ "ios/lib/machine_id_ios.cc" ]
114 "lib/recursive_cross_process_lock_posix.cc",
115 "lib/recursive_cross_process_lock_posix.h",
120 source_set("rlz_lib") {
122 "lib/financial_ping.cc",
123 "lib/financial_ping.h",
129 ":rlz_lib_no_network",
135 "//base/third_party/dynamic_annotations",
136 "//build:chromeos_buildflags",
138 "//services/network/public/cpp:cpp",
139 "//services/network/public/mojom",
143 if (is_chromeos_ash) {
145 "//chromeos/ash/components/dbus",
146 "//chromeos/ash/components/system",
150 public_configs = [ ":rlz_lib_config" ]
153 source_set("test_support") {
156 "test/rlz_test_helpers.cc",
157 "test/rlz_test_helpers.h",
161 "//base/test:test_support",
166 "//build:chromeos_buildflags",
168 if (is_chromeos_ash) {
169 public_deps += [ "//chromeos/ash/components/system" ]
173 test("rlz_unittests") {
175 "lib/crc32_unittest.cc",
176 "lib/crc8_unittest.cc",
177 "lib/financial_ping_test.cc",
178 "lib/lib_values_unittest.cc",
179 "lib/machine_id_unittest.cc",
180 "lib/rlz_lib_test.cc",
181 "lib/string_utils_unittest.cc",
182 "test/rlz_unittest_main.cc",
186 sources += [ "win/lib/machine_deal_test.cc" ]
194 "//build:chromeos_buildflags",
195 "//mojo/core/embedder",
196 "//net:test_support",
197 "//services/network:test_support",
200 "//third_party/zlib",
202 if (is_chromeos_ash) {
204 "//chromeos/ash/components/dbus:test_support",
205 "//chromeos/ash/components/dbus/debug_daemon",
206 "//chromeos/ash/components/system",
212 if (!is_ios && !is_android) {
213 executable("rlz_id") {
214 sources = [ "examples/rlz_id.cc" ]
217 "//build/win:default_exe_manifest",
223 shared_library("rlz") {
225 "win/dll/dll_main.cc",
226 "win/dll/exports.cc",
231 "//third_party/zlib",