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 import("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 import("//chrome/version.gni")
9 # TODO(GYP) for Windows need to the the reorder-imports step which probably
10 # means adding another target and renaming this to chrome_initial like in GYP.
11 #executable("chrome") { # TODO(GYP) enable once this links.
12 source_set("chrome") {
13 # Because the sources list varies so significantly per-platform, generally
14 # each platform lists its own files rather than relying on filtering or
15 # removing unused files.
17 "app/chrome_exe_resource.h",
21 # TODO(GYP) mac_bundle_resources, xcode_settings
23 # TODO(GYP) order_profiling, order_text_section
27 "app/chrome_exe_main_win.cc",
30 "app/signature_validator_win.cc",
31 "app/signature_validator_win.h",
32 "//content/app/startup_helper_win.cc",
34 deps += [ "//ui/gfx" ]
35 } else if (use_aura) {
36 # Non-Windows aura entrypoint.
37 sources += [ "app/chrome_exe_main_aura.cc" ]
41 # TODO(GYP) manpage action
44 "app/chrome_dll_resource.h",
46 "app/chrome_main_delegate.cc",
47 "app/chrome_main_delegate.h",
51 # On Linux, link the dependencies (libraries) that make up actual
52 # Chromium functionality directly into the executable.
53 ":browser_dependencies",
54 ":child_dependencies",
57 # Needed to use the master_preferences functions
58 "//chrome/installer/util",
62 # Needed for chrome_main.cc initialization of libraries.
63 configs += [ "//build/config/linux:pangocairo" ]
65 # TODO(GYP) ['profiling==0 and linux_disable_pie==0', {
73 "//build/config/linux:x11",
74 "//build/config/linux:xext",
81 "app/chrome_exe_main_mac.cc",
88 shared_library("main_dll") {
89 configs += [ "//build/config/compiler:wexit_time_destructors" ]
92 ":browser_dependencies",
96 output_name = "chrome"
99 "app/chrome_command_ids.h",
101 "app/chrome_dll_resource.h",
102 "app/chrome_main.cc",
103 "app/chrome_main_delegate.cc",
104 "app/chrome_main_delegate.h",
105 "app/delay_load_hook_win.cc",
106 "app/delay_load_hook_win.h",
107 "//base/win/dllmain.cc",
111 # On Windows, link the dependencies (libraries) that make up actual
112 # Chromium functionality into this .dll.
113 #'chrome_version_resources', TODO(GYP)
114 "//chrome/app/theme:chrome_unscaled_resources",
115 "//content/app/resources",
117 "//net:net_resources",
120 #'<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf' ] TODO(GYP)
122 if (enable_configuration_policy) {
123 deps += [ "//components/policy" ]
125 if (cpu_arch == "x86") {
126 # Add a dependency to custom import library for user32 delay imports only
128 #deps += [ 'chrome_user32_delay_imports' ] TODO(GYP)
131 # TODO(GYP) incremental linking flags in debug builds
132 #'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
134 # TODO(GYP) Lots of VCLinkerTool stuff on Windows.
136 # TODO(GYP) chrome_pgo_phase on Windows.
140 deps += [ "//ui/compositor" ]
143 #TODO(GYP) add chrome_multiple_dll support
144 if (false) { #chrome_multiple_dll) {
145 defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ]
147 "//content/app:browser",
151 ":child_dependencies",
152 "//content/app:both",
156 if (cld_version == 0 || cld_version == 2) {
158 "//third_party/cld_2",
163 #['OS=="mac" and component!="shared_library"', { TODO(GYP)
164 # 'includes': [ 'chrome_dll_bundle.gypi' ],
167 # TODO(GYP) Lots of other stuff in the OS=="mac" block.
171 # GYP version: chromium_browser_dependencies variable in chrome.gyp
172 group("browser_dependencies") {
180 "//ppapi:ppapi_host",
184 if (printing_mode != 0) {
185 deps += [ "//printing" ]
186 if (printing_mode == 1) {
187 deps += [ "//chrome/service" ]
192 # GYP version: chromium_child_dependencies variable in chrome.gyp
193 group("child_dependencies") {
200 "//chrome/browser/devtools",
205 "//content/ppapi_plugin",
206 "//third_party/WebKit/public:blink_devtools_frontend_resources",
212 # TODO(brettw) this duplicates "//chrome/common:version" which applies to
214 process_version("version_header") {
215 # TODO(brettW) this should have more reduced visibility, but chrome/browser
216 # currently depends on this.
218 source = "version.h.in"
219 # TODO(brettw) this should move to $target_gen_dir/version.h and
220 # source files including it should reference it via "chrome/version.h"
221 output = "$root_gen_dir/version.h"
225 # GYP version: chrome/chrome_resources.gyp:chrome_resources
228 # Note: GYP lists some dependencies in addition to these actions. However,
229 # these are just dependencies for the actions themselves, which our actions
230 # list individually when needed.
231 "//chrome/browser:resources",
232 "//chrome/common:resources",
233 "//chrome/renderer:resources",
236 if (enable_extensions) {
237 deps += [ "//chrome/common:extensions_api_resources" ]
241 # GYP version: chrome/chrome_resources.gyp:chrome_extra_resources
242 group("extra_resources") {
244 "//chrome/browser/resources:invalidations_resources",
245 "//chrome/browser/resources:memory_internals_resources",
246 "//chrome/browser/resources:net_internals_resources",
247 "//chrome/browser/resources:password_manager_internals_resources",
248 "//chrome/browser/resources:signin_internals_resources",
249 "//chrome/browser/resources:sync_internals_resources",
250 "//chrome/browser/resources:translate_internals_resources",
254 "//chrome/browser/resources:component_extension_resources",
255 "//chrome/browser/resources:options_resources",
259 if (enable_chromevox_next) {
261 #'browser/resources/chromeos/chromevox2/chromevox.gyp:chromevox2', TODO(GYP)
265 #'browser/resources/chromeos/chromevox/chromevox.gyp:chromevox', TODO(GYP)
269 if (enable_extensions) {
271 "//chrome/browser/resources:quota_internals_resources",
272 "//chrome/browser/resources:sync_file_system_internals_resources",
277 # GYP version: chrome/chrome_resources.gyp:chrome_strings
280 "//chrome/app:chromium_strings",
281 "//chrome/app:generated_resources",
282 "//chrome/app:google_chrome_strings",
283 "//chrome/app/resources:locale_settings",