summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio6Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-28 16:18:55 (GMT)
committerBrad King <brad.king@kitware.com>2009-10-28 16:18:55 (GMT)
commit90b8164e444699d97982b199b423a529f66eb13e (patch)
tree9e6aa3b36e5c85de677b226a3865cbaa2985d3ac /Source/cmLocalVisualStudio6Generator.cxx
parent1024ffad823cbbb354f051e7d1745644b143a36e (diff)
downloadCMake-90b8164e444699d97982b199b423a529f66eb13e.zip
CMake-90b8164e444699d97982b199b423a529f66eb13e.tar.gz
CMake-90b8164e444699d97982b199b423a529f66eb13e.tar.bz2
Use per-config output dir in VS 6 templates
This commit removes use of configuration-less cmTarget::GetDirectory() by the VS 6 generator (except for compatibility with user templates). We replace OUTPUT_DIRECTORY_<CONFIG> tokens in the templates using the per-configuration result of cmTarget::GetDirectory(config).
Diffstat (limited to 'Source/cmLocalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx34
1 files changed, 34 insertions, 0 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 3719b5f..54f7bf4 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -1193,6 +1193,30 @@ void cmLocalVisualStudio6Generator
outputNameRelWithDebInfo = target.GetFullName("RelWithDebInfo");
}
+ // Compute the output directory for the target.
+ std::string outputDirDebug;
+ std::string outputDirRelease;
+ std::string outputDirMinSizeRel;
+ std::string outputDirRelWithDebInfo;
+ if(target.GetType() == cmTarget::EXECUTABLE ||
+ target.GetType() == cmTarget::STATIC_LIBRARY ||
+ target.GetType() == cmTarget::SHARED_LIBRARY ||
+ target.GetType() == cmTarget::MODULE_LIBRARY)
+ {
+ outputDirDebug =
+ removeQuotes(this->ConvertToOptionallyRelativeOutputPath(
+ target.GetDirectory("Debug").c_str()));
+ outputDirRelease =
+ removeQuotes(this->ConvertToOptionallyRelativeOutputPath(
+ target.GetDirectory("Release").c_str()));
+ outputDirMinSizeRel =
+ removeQuotes(this->ConvertToOptionallyRelativeOutputPath(
+ target.GetDirectory("MinSizeRel").c_str()));
+ outputDirRelWithDebInfo =
+ removeQuotes(this->ConvertToOptionallyRelativeOutputPath(
+ target.GetDirectory("RelWithDebInfo").c_str()));
+ }
+
// Compute the proper link information for the target.
std::string optionsDebug;
std::string optionsRelease;
@@ -1412,11 +1436,21 @@ void cmLocalVisualStudio6Generator
if(targetBuilds)
{
+ cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_DEBUG",
+ outputDirDebug.c_str());
+ cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_RELEASE",
+ outputDirRelease.c_str());
+ cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_MINSIZEREL",
+ outputDirMinSizeRel.c_str());
+ cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_RELWITHDEBINFO",
+ outputDirRelWithDebInfo.c_str());
+#ifdef CM_USE_OLD_VS6
std::string outPath = target.GetDirectory();
cmSystemTools::ReplaceString
(line, "OUTPUT_DIRECTORY",
removeQuotes(this->ConvertToOptionallyRelativeOutputPath
(outPath.c_str())).c_str());
+#endif
}
cmSystemTools::ReplaceString(line,