mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-07 00:00:57 +00:00
Add EXPORT_NAME property.
This allows for example, the buildsystem to use names like 'boost_any' instead of the overly generic 'any', and still be able to generate IMPORTED targets called 'boost::any'.
This commit is contained in:
@@ -376,7 +376,7 @@ void cmExportFileGenerator::GenerateInterfaceProperties(cmTarget *target,
|
||||
if (!properties.empty())
|
||||
{
|
||||
std::string targetName = this->Namespace;
|
||||
targetName += target->GetName();
|
||||
targetName += target->GetExportName();
|
||||
os << "set_target_properties(" << targetName << " PROPERTIES\n";
|
||||
for(ImportPropertyMap::const_iterator pi = properties.begin();
|
||||
pi != properties.end(); ++pi)
|
||||
@@ -407,7 +407,7 @@ cmExportFileGenerator::AddTargetNamespace(std::string &input,
|
||||
}
|
||||
if(this->ExportedTargets.find(tgt) != this->ExportedTargets.end())
|
||||
{
|
||||
input = this->Namespace + input;
|
||||
input = this->Namespace + tgt->GetExportName();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -772,7 +772,8 @@ cmExportFileGenerator
|
||||
{
|
||||
// Construct the imported target name.
|
||||
std::string targetName = this->Namespace;
|
||||
targetName += target->GetName();
|
||||
|
||||
targetName += target->GetExportName();
|
||||
|
||||
// Create the imported target.
|
||||
os << "# Create imported target " << targetName << "\n";
|
||||
@@ -835,7 +836,8 @@ cmExportFileGenerator
|
||||
{
|
||||
// Construct the imported target name.
|
||||
std::string targetName = this->Namespace;
|
||||
targetName += target->GetName();
|
||||
|
||||
targetName += target->GetExportName();
|
||||
|
||||
// Set the import properties.
|
||||
os << "# Import target \"" << targetName << "\" for configuration \""
|
||||
@@ -954,7 +956,7 @@ cmExportFileGenerator
|
||||
{
|
||||
// Construct the imported target name.
|
||||
std::string targetName = this->Namespace;
|
||||
targetName += target->GetName();
|
||||
targetName += target->GetExportName();
|
||||
|
||||
os << "list(APPEND _IMPORT_CHECK_TARGETS " << targetName << " )\n"
|
||||
"list(APPEND _IMPORT_CHECK_FILES_FOR_" << targetName << " ";
|
||||
|
||||
Reference in New Issue
Block a user