Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: tools/gn/create_bundle_target_generator.cc

Issue 1827103005: [GN] Add support for generating Xcode projects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve comment about "assert(product_type != "")" Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/commands.cc ('k') | tools/gn/functions_target.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/create_bundle_target_generator.cc
diff --git a/tools/gn/create_bundle_target_generator.cc b/tools/gn/create_bundle_target_generator.cc
index 608541911e1248a6173d9c16a886140d59771230..83749983e6d00383666f6f7628287ecbbb5a9926 100644
--- a/tools/gn/create_bundle_target_generator.cc
+++ b/tools/gn/create_bundle_target_generator.cc
@@ -41,6 +41,14 @@ void CreateBundleTargetGenerator::DoRun() {
variables::kBundlePlugInsDir,
&bundle_data.plugins_dir()))
return;
+
+ const Value* value = scope_->GetValue(variables::kProductType, true);
+ if (value) {
+ if (!value->VerifyTypeIs(Value::STRING, err_))
+ return;
+
+ bundle_data.product_type().assign(value->string_value());
+ }
}
bool CreateBundleTargetGenerator::GetBundleDir(
@@ -53,6 +61,8 @@ bool CreateBundleTargetGenerator::GetBundleDir(
if (!value->VerifyTypeIs(Value::STRING, err_))
return false;
std::string str = value->string_value();
+ if (!str.empty() && str[str.size() - 1] != '/')
+ str.push_back('/');
if (!EnsureStringIsInOutputDir(GetBuildSettings()->build_dir(), str,
value->origin(), err_))
return false;
« no previous file with comments | « tools/gn/commands.cc ('k') | tools/gn/functions_target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698