summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-08-01 15:36:35 (GMT)
committerBrad King <brad.king@kitware.com>2007-08-01 15:36:35 (GMT)
commite0fc8b2995932253e3b51aca56024c617662c7bb (patch)
tree99952821f5031f1cd67c5dcddcd8b3202378233d /Source/cmTarget.cxx
parentf0d1e1626d52cd9c7f54e9c61d4f4dbab0e7b7a7 (diff)
downloadCMake-e0fc8b2995932253e3b51aca56024c617662c7bb.zip
CMake-e0fc8b2995932253e3b51aca56024c617662c7bb.tar.gz
CMake-e0fc8b2995932253e3b51aca56024c617662c7bb.tar.bz2
BUG: <CONFIG>_LOCATION property should use the config name in the directory and not $(OutDir). This addresses bug#5363.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 3db4add..1ca187d 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1277,16 +1277,22 @@ const char* cmTarget::ImportedGetLocation(const char* config)
//----------------------------------------------------------------------------
const char* cmTarget::NormalGetLocation(const char* config)
{
- this->Location = this->GetDirectory();
+ this->Location = this->GetDirectory(config);
if(!this->Location.empty())
{
this->Location += "/";
}
- const char* cfgid = this->Makefile->GetDefinition("CMAKE_CFG_INTDIR");
- if(cfgid && strcmp(cfgid, ".") != 0)
+ if(!config)
{
- this->Location += cfgid;
- this->Location += "/";
+ // No specific configuration was given so it will not appear on
+ // the result of GetDirectory. Add a name here to be replaced at
+ // build time.
+ const char* cfgid = this->Makefile->GetDefinition("CMAKE_CFG_INTDIR");
+ if(cfgid && strcmp(cfgid, ".") != 0)
+ {
+ this->Location += cfgid;
+ this->Location += "/";
+ }
}
this->Location += this->GetFullName(config, false);
return this->Location.c_str();