VS: Handle VS_GLOBAL_RootNamespace special case

Although we provide a `VS_GLOBAL_ROOTNAMESPACE` option to both set
the `RootNamespace` value and reference it, some users may try to
set `VS_GLOBAL_RootNamespace` to set `RootNamespace` as a variant
of the `VS_GLOBAL_<variable>` property.  In this case we still
need to add the reference to `$(RootNamespace)`.
This commit is contained in:
Benjamin Ballet 2016-07-20 17:10:07 +02:00 committed by Brad King
parent df14a98e9c
commit 8aa97fba9e
1 changed files with 3 additions and 1 deletions

View File

@ -531,7 +531,9 @@ void cmVisualStudio10TargetGenerator::WriteEmbeddedResourceGroup()
this->Configurations.begin();
i != this->Configurations.end(); ++i) {
this->WritePlatformConfigTag("LogicalName", i->c_str(), 3);
if (this->GeneratorTarget->GetProperty("VS_GLOBAL_ROOTNAMESPACE")) {
if (this->GeneratorTarget->GetProperty("VS_GLOBAL_ROOTNAMESPACE") ||
// Handle variant of VS_GLOBAL_<variable> for RootNamespace.
this->GeneratorTarget->GetProperty("VS_GLOBAL_RootNamespace")) {
(*this->BuildFileStream) << "$(RootNamespace).";
}
(*this->BuildFileStream) << "%(Filename)";