forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBUILD.gn
117 lines (107 loc) · 3.31 KB
/
BUILD.gn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/buildflag_header.gni")
import("//build/config/chrome_build.gni")
import("//testing/test.gni")
buildflag_header("buildflags") {
header = "buildflags.h"
if (is_chrome_branded && is_win) {
flags = [ "USE_GOOGLE_UPDATE_INTEGRATION=true" ]
} else {
flags = [ "USE_GOOGLE_UPDATE_INTEGRATION=false" ]
}
}
if (is_win) {
# This file contains utility functions that only depend on kernel32.
# Please don't add dependencies on other system libraries.
static_library("install_static_util") {
deps = [
"//base/version_info:channel",
"//base/version_info:generate_version_info",
"//components/nacl/common:buildflags",
]
public_deps = [
":buildflags",
"//build:branding_buildflags",
"//chrome/chrome_elf:nt_registry",
]
sources = [
"../app/chrome_dll_resource.h",
"../common/chrome_icon_resources_win.h",
"//base/compiler_specific.h",
"//base/win/win_handle_types.h",
"//base/win/win_handle_types_list.inc",
"//base/win/windows_types.h",
"install_constants.h",
"install_details.cc",
"install_details.h",
"install_modes.cc",
"install_modes.h",
"install_util.cc",
"install_util.h",
"policy_path_parser.cc",
"policy_path_parser.h",
"product_install_details.cc",
"product_install_details.h",
"user_data_dir.cc",
"user_data_dir.h",
]
if (is_chrome_branded) {
sources += [
"google_chrome_install_modes.cc",
"google_chrome_install_modes.h",
]
} else if (is_chrome_for_testing_branded) {
sources += [
"google_chrome_for_testing_install_modes.cc",
"google_chrome_for_testing_install_modes.h",
]
} else {
sources += [
"chromium_install_modes.cc",
"chromium_install_modes.h",
]
}
libs = [ "kernel32.lib" ]
}
# A source set for use by the module in a process that creates the
# process-wide InstallDetails instance (i.e., chrome_elf.dll).
source_set("primary_module") {
sources = [ "get_install_details_payload.cc" ]
deps = [ ":install_static_util" ]
}
# A source set for use by modules in a process that fetch the process-wide
# InstallDetails instance from the primary module by way of
# GetInstallDetailsPayload (i.e., chrome.exe and chrome.dll).
source_set("secondary_module") {
sources = [
"initialize_from_primary_module.cc",
"initialize_from_primary_module.h",
]
deps = [ ":install_static_util" ]
}
test("install_static_unittests") {
output_name = "install_static_unittests"
sources = [
"install_details_unittest.cc",
"install_modes_unittest.cc",
"install_util_unittest.cc",
"product_install_details_unittest.cc",
"user_data_dir_win_unittest.cc",
]
include_dirs = [ "$target_gen_dir" ]
deps = [
":buildflags",
"//base",
"//base/test:run_all_unittests",
"//base/test:test_support",
"//base/version_info",
"//build:branding_buildflags",
"//chrome/install_static:install_static_util",
"//chrome/install_static/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
}
}