summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-12-04 14:10:05 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-12-04 14:10:05 (GMT)
commitba98442610024cf50cb407a5cc09f25096a7c79a (patch)
tree960f6544f0a5884da6e32568436b7c533c0c3bb6 /Source/cmVisualStudio10TargetGenerator.cxx
parent0f381ad5218758aadf92bbd4e5d68347a06cc3ab (diff)
parent352f246f3ebfd8daf5fda9bad2db01b56fa4bf4d (diff)
downloadCMake-ba98442610024cf50cb407a5cc09f25096a7c79a.zip
CMake-ba98442610024cf50cb407a5cc09f25096a7c79a.tar.gz
CMake-ba98442610024cf50cb407a5cc09f25096a7c79a.tar.bz2
Merge topic 'vs-phone-store-deployment-location'
352f246f VS: Add source file property to specify Windows App deployment location
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 2304be8..d79d0b6 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1261,6 +1261,7 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
}
std::string deployContent;
+ std::string deployLocation;
if(this->GlobalGenerator->TargetsWindowsPhone() ||
this->GlobalGenerator->TargetsWindowsStore())
{
@@ -1269,6 +1270,12 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
{
toolHasSettings = true;
deployContent = content;
+
+ const char* location = sf->GetProperty("VS_DEPLOYMENT_LOCATION");
+ if(location && *location)
+ {
+ deployLocation = location;
+ }
}
}
@@ -1283,6 +1290,14 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
cmGeneratorExpression ge;
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
ge.Parse(deployContent);
+ // Deployment location cannot be set on a configuration basis
+ if(!deployLocation.empty())
+ {
+ this->WriteString("<Link>", 3);
+ (*this->BuildFileStream) << deployLocation
+ << "\\%(FileName)%(Extension)";
+ this->WriteString("</Link>\n", 0);
+ }
for(size_t i = 0; i != configs->size(); ++i)
{
if(0 == strcmp(cge->Evaluate(this->Makefile, (*configs)[i]), "1"))