diff options
Diffstat (limited to 'Source/cmExportInstallFileGenerator.cxx')
-rw-r--r-- | Source/cmExportInstallFileGenerator.cxx | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 64ea3c8..16bd5e8 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -195,8 +195,10 @@ void cmExportInstallFileGenerator::GenerateImportPrefix(std::ostream& os) << " \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n"; if (cmHasLiteralPrefix(absDestS.c_str(), "/lib/") || cmHasLiteralPrefix(absDestS.c_str(), "/lib64/") || + cmHasLiteralPrefix(absDestS.c_str(), "/libx32/") || cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib/") || - cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib64/")) { + cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib64/") || + cmHasLiteralPrefix(absDestS.c_str(), "/usr/libx32/")) { // Handle "/usr move" symlinks created by some Linux distros. /* clang-format off */ os << @@ -329,6 +331,8 @@ void cmExportInstallFileGenerator::GenerateImportTargetsConfig( properties, importedLocations); this->SetImportLocationProperty(config, suffix, te->RuntimeGenerator, properties, importedLocations); + this->SetImportLocationProperty(config, suffix, te->ObjectsGenerator, + properties, importedLocations); this->SetImportLocationProperty(config, suffix, te->FrameworkGenerator, properties, importedLocations); this->SetImportLocationProperty(config, suffix, te->BundleGenerator, @@ -395,6 +399,23 @@ void cmExportInstallFileGenerator::SetImportLocationProperty( // Store the property. properties[prop] = value; importedLocations.insert(prop); + } else if (itgen->GetTarget()->GetType() == cmStateEnums::OBJECT_LIBRARY) { + // Construct the property name. + std::string prop = "IMPORTED_OBJECTS"; + prop += suffix; + + // Compute all the object files inside this target and setup + // IMPORTED_OBJECTS as a list of object files + std::vector<std::string> objects; + itgen->GetInstallObjectNames(config, objects); + for (std::vector<std::string>::iterator i = objects.begin(); + i != objects.end(); ++i) { + *i = value + *i; + } + + // Store the property. + properties[prop] = cmJoin(objects, ";"); + importedLocations.insert(prop); } else { // Construct the property name. std::string prop = "IMPORTED_LOCATION"; |