| 137 | } |
| 138 | |
| 139 | void cmExportInstallPackageInfoGenerator::GenerateImportTargetsConfig( |
| 140 | std::ostream& os, std::string const& config, std::string const& suffix) |
| 141 | { |
| 142 | Json::Value root; |
| 143 | root["name"] = this->GetPackageName(); |
| 144 | root["configuration"] = (config.empty() ? "noconfig" : config); |
| 145 | |
| 146 | std::string const& packagePath = this->GenerateImportPrefix(); |
| 147 | |
| 148 | Json::Value& components = root["components"]; |
| 149 | |
| 150 | for (auto const& te : this->GetExportSet()->GetTargetExports()) { |
| 151 | // Collect import properties for this target. |
| 152 | ImportPropertyMap properties; |
| 153 | std::set<std::string> importedLocations; |
| 154 | |
| 155 | if (this->GetExportTargetType(te.get()) != |
| 156 | cmStateEnums::INTERFACE_LIBRARY) { |
| 157 | this->PopulateImportProperties(config, suffix, te.get(), properties, |
| 158 | importedLocations); |
| 159 | } |
| 160 | |
| 161 | Json::Value component = |
| 162 | this->GenerateInterfaceConfigProperties(suffix, properties); |
| 163 | this->GenerateFileSetProperties(component, te->Target, te.get(), |
| 164 | packagePath, config); |
| 165 | |
| 166 | if (!component.empty()) { |
| 167 | components[te->Target->GetExportName()] = std::move(component); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | this->WritePackageInfo(root, os); |
| 172 | } |
| 173 | |
| 174 | std::string cmExportInstallPackageInfoGenerator::GenerateImportPrefix() const |
| 175 | { |
nothing calls this directly
no test coverage detected