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.
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("//testing/test.gni")
10 config("rlz_config") {
11 defines = [ "RLZ_NETWORK_IMPLEMENTATION_CHROME_NET" ]
14 source_set("rlz_utils") {
19 "lib/crc32_wrapper.cc",
22 "lib/net_response_check.cc",
23 "lib/net_response_check.h",
26 "lib/string_utils.cc",
30 public_configs = [ ":rlz_config" ]
41 source_set("rlz_lib") {
43 "chromeos/lib/rlz_value_store_chromeos.cc",
44 "chromeos/lib/rlz_value_store_chromeos.h",
45 "ios/lib/machine_id_ios.cc",
48 "lib/financial_ping.cc",
49 "lib/financial_ping.h",
52 "lib/recursive_cross_process_lock_posix.cc",
53 "lib/recursive_cross_process_lock_posix.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",
75 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
76 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
78 public_configs = [ ":rlz_config" ]
83 "//base/third_party/dynamic_annotations",
89 deps += [ "//chromeos" ]
94 "Foundation.framework",
100 # These _mac files are also used on iOS.
101 set_sources_assignment_filter([])
103 "mac/lib/rlz_value_store_mac.h",
104 "mac/lib/rlz_value_store_mac.mm",
106 set_sources_assignment_filter(sources_assignment_filter)
110 source_set("test_support") {
113 "test/rlz_test_helpers.cc",
114 "test/rlz_test_helpers.h",
119 "//base/test:test_support",
123 deps += [ "//chromeos" ]
127 test("rlz_unittests") {
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",
140 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
141 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
148 "//net:test_support",
151 "//third_party/zlib",
154 deps += [ "//chromeos" ]
159 if (!is_ios && !is_android) {
160 executable("rlz_id") {
162 "examples/rlz_id.cc",
166 "//build/config:exe_and_shlib_deps",
167 "//build/win:default_exe_manifest",
173 shared_library("rlz") {
175 "win/dll/dll_main.cc",
176 "win/dll/exports.cc",
181 "//build/config:exe_and_shlib_deps",
182 "//third_party/zlib",