<div dir="ltr">Is there any way to exclude a dependency from an export? If I build a static library target "A" but do not wish to install it, and then link that target to another target "B" using target_link_libraries(B A), and then attempt to export B, I get the error message:<div><br></div><div>install (EXPORT "B" ...) includes target "B" which requires target "A" that is not in the export set. </div><div><br></div><div>I can solve the problem by installing A, but there is no need to. It is a temporary target that is statically linked. I just need to export for creating a package config file, so there's no need for the package config to ever need to worry about statically linked libraries. </div><div><br></div><div>Is there a workaround for this? </div><div><br>Long story short, I am trying to replicate convenience libraries from autotools. I'm having a hell of time doing it. I can use lists of sources, but that requires passing around global variables that include the sources and others that include the required libraries. This is far messier and far less convenient. I've tried object libraries, and while they eliminate the global source variables and prevent rebuilding things, they fail when the source is nested, and you want to build a "super library" from smaller object libraries, which I believe is a fairly common working pattern. Building a static library that is never installed works really well ... until I go to create a package config file. Then this export fails. </div><div><br></div><div>Thanks,</div><div>--Jack</div></div>