@craig.scott
Unfortunately I dont have full project ready to post but hope we will be able demo implementation base d on snippet that @ClausKlein kindly posted. With my questions I am trying to check the cmake expected behavior or requirements before implementation so could you please advise if cmake satisfies the following high level requirements.
R1. cmake shall be able to install a project’s target with all its transient dependencies if they are being built with the project. For example if target A depends on targets B, C and all of the targets are being built by the project, cmake shall be able to install B,C automatically when installation of A is requested. NOTE: this should not depend whether or not these target are built as static or shared library (?)
R2. cmake shall allow installation of targets which have common dependencies if they are also built with the project or are external libraries added as INTERFACE libraries. In this case cmake shall not fail build as it detects that common target has been already installed.
For example if A depends on targets B, C while E depends on D,C, cmake will allow installation of A and E with all their transient dependencies despite A and E have common dependency C and without the need for cmake user to exclude common dependency from the list of targets being installed.