diff options
author | tmoniuszko <tmoniuszko@opera.com> | 2016-03-24 01:53:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-24 08:55:10 +0000 |
commit | 130612c0259b1200a8edf41973b058d5164470ef (patch) | |
tree | 0bdddb40293d1edf9956d6b9e68ab1ea9f617059 /tools | |
parent | 4a9e0e53f9149badde74e43210a384d28fbcf3f1 (diff) | |
download | chromium_src-130612c0259b1200a8edf41973b058d5164470ef.zip chromium_src-130612c0259b1200a8edf41973b058d5164470ef.tar.gz chromium_src-130612c0259b1200a8edf41973b058d5164470ef.tar.bz2 |
Convert GN group targets to Visual Studio projects
BUG=596895
Review URL: https://codereview.chromium.org/1819353002
Cr-Commit-Position: refs/heads/master@{#383042}
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gn/visual_studio_writer.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/gn/visual_studio_writer.cc b/tools/gn/visual_studio_writer.cc index 801ea77..4c88f35 100644 --- a/tools/gn/visual_studio_writer.cc +++ b/tools/gn/visual_studio_writer.cc @@ -125,6 +125,8 @@ std::string GetConfigurationType(const Target* target, Err* err) { case Target::STATIC_LIBRARY: case Target::SOURCE_SET: return "StaticLibrary"; + case Target::GROUP: + return "Utility"; default: *err = Err(Location(), @@ -259,9 +261,8 @@ bool VisualStudioWriter::RunAndWriteFiles(const BuildSettings* build_settings, writer.folders_.reserve(targets.size()); for (const Target* target : targets) { - // Skip actions, groups and bundle targets. - if (target->output_type() == Target::GROUP || - target->output_type() == Target::COPY_FILES || + // Skip actions and bundle targets. + if (target->output_type() == Target::COPY_FILES || target->output_type() == Target::ACTION || target->output_type() == Target::ACTION_FOREACH || target->output_type() == Target::BUNDLE_DATA) { @@ -424,11 +425,13 @@ bool VisualStudioWriter::WriteProjectFileContents( scoped_ptr<XmlElementWriter> out_dir = properties->SubElement("OutDir"); path_output.WriteDir(out_dir->StartContent(false), build_settings_->build_dir(), - PathOutput::DIR_INCLUDE_LAST_SLASH); + PathOutput::DIR_NO_LAST_SLASH); } properties->SubElement("TargetName")->Text("$(ProjectName)"); - properties->SubElement("TargetPath") - ->Text("$(OutDir)\\$(ProjectName)$(TargetExt)"); + if (target->output_type() != Target::GROUP) { + properties->SubElement("TargetPath") + ->Text("$(OutDir)\\$(ProjectName)$(TargetExt)"); + } } { |