mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 13:19:51 -05:00
cmTarget: Restore <CONFIG>_LOCATION to CMP0026 OLD behavior (#14808)
Restore support for the undocumented <CONFIG>_LOCATION target property removed by commit v3.0.0-rc1~175^2 (cmTarget: Remove support for <CONFIG>_LOCATION property, 2013-12-30) as part of the CMP0026 OLD behavior.
This commit is contained in:
@@ -2730,6 +2730,21 @@ const char *cmTarget::GetProperty(const char* prop,
|
||||
this->GetLocation(configName.c_str()),
|
||||
cmProperty::TARGET);
|
||||
}
|
||||
// Support "<CONFIG>_LOCATION".
|
||||
if(cmHasLiteralSuffix(prop, "_LOCATION"))
|
||||
{
|
||||
std::string configName(prop, strlen(prop) - 9);
|
||||
if(configName != "IMPORTED")
|
||||
{
|
||||
if (!this->HandleLocationPropertyPolicy())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
this->Properties.SetProperty(prop,
|
||||
this->GetLocation(configName.c_str()),
|
||||
cmProperty::TARGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(strcmp(prop,"INCLUDE_DIRECTORIES") == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user