Re: [CMake] Modern cmake advise for transitive library dependencies

2018-12-19 Thread Roger Leigh
On 18/12/2018 20:54, Craig Scott wrote: Your XConfig.cmake is responsible for also ensuring all targets it depends on are defined. This shouldn't be left up to consumers of X. The way this is normally done is pretty much as Alan suggests (it's also the way I handle cases analogous to yours in

Re: [CMake] Modern cmake advise for transitive library dependencies

2018-12-18 Thread Mario Emmenlauer
Dear Craig, Alan, thanks so much for this hint! I did not write the initial XConfig.cmake myself and so it slipped my attention. Now things are perfectly clear, I'll extend the XConfig.cmake.in and add the configuration steps there. All the best, Mario On 18.12.18 21:54, Craig Scott wro

Re: [CMake] Modern cmake advise for transitive library dependencies

2018-12-18 Thread Craig Scott
On Wed, Dec 19, 2018 at 5:36 AM Alan W. Irwin wrote: > On 2018-12-17 21:35+0100 Mario Emmenlauer wrote: > > > > > Dear cmake team and user community, > > > > I'd kindly like to ask for advice on how to handle transitive > > dependencies cleanly with "modern" cmake. I'm often plagued by this > > p

Re: [CMake] Modern cmake advise for transitive library dependencies

2018-12-18 Thread Alan W. Irwin
On 2018-12-17 21:35+0100 Mario Emmenlauer wrote: Dear cmake team and user community, I'd kindly like to ask for advice on how to handle transitive dependencies cleanly with "modern" cmake. I'm often plagued by this problem: I have a library X that optionally depends on library A. When I build

[CMake] Modern cmake advise for transitive library dependencies

2018-12-17 Thread Mario Emmenlauer
Dear cmake team and user community, I'd kindly like to ask for advice on how to handle transitive dependencies cleanly with "modern" cmake. I'm often plagued by this problem: I have a library X that optionally depends on library A. When I build library Y that depends on X, how do I (cleanly) ha