summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 46e9ed4..3d8adae 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2959,6 +2959,8 @@ const char *cmTarget::GetProperty(const std::string& prop,
MAKE_STATIC_PROP(COMPILE_DEFINITIONS);
MAKE_STATIC_PROP(IMPORTED);
MAKE_STATIC_PROP(NAME);
+ MAKE_STATIC_PROP(BINARY_DIR);
+ MAKE_STATIC_PROP(SOURCE_DIR);
MAKE_STATIC_PROP(SOURCES);
#undef MAKE_STATIC_PROP
if(specialProps.empty())
@@ -2971,6 +2973,8 @@ const char *cmTarget::GetProperty(const std::string& prop,
specialProps.insert(propCOMPILE_DEFINITIONS);
specialProps.insert(propIMPORTED);
specialProps.insert(propNAME);
+ specialProps.insert(propBINARY_DIR);
+ specialProps.insert(propSOURCE_DIR);
specialProps.insert(propSOURCES);
}
if(specialProps.count(prop))
@@ -3053,6 +3057,14 @@ const char *cmTarget::GetProperty(const std::string& prop,
{
return this->GetName().c_str();
}
+ else if (prop == propBINARY_DIR)
+ {
+ return this->GetMakefile()->GetCurrentBinaryDirectory();
+ }
+ else if (prop == propSOURCE_DIR)
+ {
+ return this->GetMakefile()->GetCurrentSourceDirectory();
+ }
else if(prop == propSOURCES)
{
if (this->Internal->SourceEntries.empty())