Export: Never treat private link libraries as public package dependencies.
Multiple libraries in a single buildsystem can be exported to multiple export-sets. If a library from one export set depends on a library from another export set, the export logic generates a check in the targets file to verify that the target in the other export set is found. That check is executed at downstream-find_package-time. However, a target may depend privately on a target in another export set. In that case, the depend used to also be listed in the required targets in the targets file. Change the export logic to ignore the private link entries instead.
This commit is contained in:
parent
faef6b4ec8
commit
0ad2a1c181
|
@ -736,9 +736,10 @@ cmExportFileGenerator
|
||||||
"IMPORTED_LINK_INTERFACE_LANGUAGES",
|
"IMPORTED_LINK_INTERFACE_LANGUAGES",
|
||||||
iface->Languages, properties, missingTargets);
|
iface->Languages, properties, missingTargets);
|
||||||
|
|
||||||
|
std::vector<std::string> dummy;
|
||||||
this->SetImportLinkProperty(suffix, target,
|
this->SetImportLinkProperty(suffix, target,
|
||||||
"IMPORTED_LINK_DEPENDENT_LIBRARIES",
|
"IMPORTED_LINK_DEPENDENT_LIBRARIES",
|
||||||
iface->SharedDeps, properties, missingTargets);
|
iface->SharedDeps, properties, dummy);
|
||||||
if(iface->Multiplicity > 0)
|
if(iface->Multiplicity > 0)
|
||||||
{
|
{
|
||||||
std::string prop = "IMPORTED_LINK_INTERFACE_MULTIPLICITY";
|
std::string prop = "IMPORTED_LINK_INTERFACE_MULTIPLICITY";
|
||||||
|
|
Loading…
Reference in New Issue