forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GN build for some chrome common, chrome net, and resources targets.
Slight enhancements to the grit template. R=thestig@chromium.org Review URL: https://codereview.chromium.org/335053002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277517 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
brettw@chromium.org
committed
Jun 16, 2014
1 parent
7555225
commit 77ce802
Showing
14 changed files
with
268 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright 2014 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//build/config/features.gni") | ||
|
||
# GYP version: chrome/chrome_resources.gyp:chrome_resources | ||
group("resources") { | ||
deps = [ | ||
# Note: GYP lists some dependencies in addition to these actions. However, | ||
# these are just dependencies for the actions themselves, which our actions | ||
# list individually when needed. | ||
"//chrome/browser:resources", | ||
"//chrome/common:resources", | ||
"//chrome/renderer:resources", | ||
] | ||
|
||
if (enable_extensions) { | ||
deps += [ "//chrome/common:extensions_api_resources" ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Copyright 2014 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//tools/grit/grit_rule.gni") | ||
|
||
about_credits_file = "$target_gen_dir/about_credits.html" | ||
additional_modules_list_file = | ||
"$root_gen_dir/chrome/browser/internal/additional_modules_list.txt" | ||
|
||
# GYP version: chrome/chrome_resources.gyp:chrome_resources | ||
# (generate_browser_resources action) | ||
grit("resources") { | ||
source = "browser_resources.grd" | ||
|
||
omnibox_mojom_file = "$root_gen_dir/chrome/browser/ui/webui/omnibox/omnibox.mojom.js" | ||
|
||
grit_flags = [ | ||
"-E", "about_credits_file=" + | ||
rebase_path(about_credits_file, root_build_dir), | ||
"-E", "additional_modules_list_file=" + | ||
rebase_path(additional_modules_list_file, root_build_dir), | ||
"-E", "omnibox_mojom_file=" + | ||
rebase_path(omnibox_mojom_file, root_build_dir), | ||
] | ||
|
||
deps = [ | ||
":about_credits", | ||
":chrome_internal_resources_gen", | ||
"//chrome/browser/ui/webui/omnibox:mojo_bindings", | ||
] | ||
} | ||
|
||
# GYP version: chrome/chrome_resource.gyp:about_credits | ||
action("about_credits") { | ||
script = "//tools/licenses.py" | ||
|
||
# TODO(phajdan.jr): input dependencies so this can be regenerated | ||
# automatically when one of the credits changes. The way this should work is | ||
# that licenses.py should write a .d file listing the input dependencies (see | ||
# "depfile" in GN). | ||
outputs = [ about_credits_file ] | ||
|
||
args = [ | ||
"credits", | ||
rebase_path(about_credits_file, root_build_dir), | ||
] | ||
} | ||
|
||
# GYP version: chrome/chrome_resource.gyp:chrome_internal_resources_gen | ||
# TODO(GYP) write internal action | ||
if (false) { #if (is_chrome_branded) { | ||
action("chrome_internal_resources_gen") { | ||
# TODO(GYP) | ||
} | ||
} else { | ||
group("chrome_internal_resources_gen") { | ||
# Empty placeholder. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright 2014 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//mojo/public/tools/bindings/mojom.gni") | ||
|
||
# GYP version: chrome/chrome_web_ui_mojo_bindings.gyp:webui_mojo_bindings | ||
mojom("mojo_bindings") { | ||
sources = [ | ||
"omnibox.mojom", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 2014 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//tools/grit/grit_rule.gni") | ||
|
||
# GYP version: chrome/chrome_resources.gyp:chrome_resources | ||
# (generate_common_resources action) | ||
grit("resources") { | ||
source = "common_resources.grd" | ||
} | ||
|
||
# GYP version: chrome/chrome_resources.gyp:chrome_resources | ||
# (generate_extensions_api_resources action) | ||
grit("extensions_api_resources") { | ||
source = "extensions_api_resources.grd" | ||
} | ||
|
||
# TODO(GYP) add this target. | ||
#static_library("common") { | ||
# configs += [ "//build/config/compiler:wexit_time_destructors" ] | ||
#} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright 2014 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//third_party/protobuf/proto_library.gni") | ||
|
||
# GYP version: chrome/chrome_common.gypi:metrics_proto | ||
proto_library("proto") { | ||
sources = [ | ||
"chrome_experiments.proto", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Copyright 2014 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//build/config/crypto.gni") | ||
|
||
# GYP version: chrome/chrome_common.gypi:common_net | ||
static_library("net") { | ||
sources = [ | ||
"net_error_info.cc", | ||
"net_error_info.h", | ||
"net_resource_provider.cc", | ||
"net_resource_provider.h", | ||
"predictor_common.h", | ||
"url_util.cc", | ||
"url_util.h", | ||
"x509_certificate_model.cc", | ||
"x509_certificate_model.h", | ||
"x509_certificate_model_nss.cc", | ||
"x509_certificate_model_openssl.cc", | ||
] | ||
|
||
deps = [ | ||
"//base", | ||
"//chrome:resources", | ||
"//chrome:strings", | ||
"//crypto", | ||
"//net", | ||
"//net:net_resources", | ||
"//third_party/icu", | ||
] | ||
|
||
if (is_ios) { | ||
sources -= [ | ||
"net_resource_provider.cc", | ||
"x509_certificate_model.cc", | ||
] | ||
} else { | ||
deps += [ "//gpu:ipc" ] | ||
} | ||
|
||
if (is_win || is_mac || is_ios) { | ||
sources -= [ | ||
"x509_certificate_model_nss.cc", | ||
"x509_certificate_model_openssl.cc", | ||
] | ||
} | ||
|
||
if (is_android) { | ||
sources -= [ | ||
"x509_certificate_model.cc", | ||
"x509_certificate_model_openssl.cc", | ||
] | ||
deps += [ "//third_party/openssl" ] | ||
} | ||
|
||
if (use_openssl) { | ||
# networking_private_crypto.cc uses NSS functions. | ||
sources -= [ | ||
"x509_certificate_model_nss.cc", | ||
] | ||
} else { | ||
sources -= [ | ||
"x509_certificate_model_openssl.cc", | ||
] | ||
} | ||
|
||
if (is_win) { | ||
cflags = [ "/wd4267" ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright 2014 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//third_party/protobuf/proto_library.gni") | ||
|
||
# GYP version: chrome/chrome_common.gypi:safe_browsing_proto | ||
proto_library("proto") { | ||
sources = [ | ||
"client_model.proto", | ||
"crx_info.proto", | ||
"csd.proto", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright 2014 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//tools/grit/grit_rule.gni") | ||
|
||
# GYP version: chrome/chrome_resources.gyp:chrome_resources | ||
# (generate_renderer_resources action) | ||
grit("resources") { | ||
source = "resources/renderer_resources.grd" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters