Re: [CMake] FetchContent and find_package

2018-04-10 Thread Craig Scott
On Wed, Apr 11, 2018 at 2:28 AM, Saad Khattak wrote: > Thank you Craig. > > >> Imported targets are definitely more preferable though > > Can you please elaborate on this? > Variables are the old way of passing details about a target to a consuming target. It was customary

Re: [CMake] FetchContent and find_package

2018-04-10 Thread Saad Khattak
Thank you Craig. >> Imported targets are definitely more preferable though Can you please elaborate on this? On Tue, Apr 10, 2018 at 10:23 AM Craig Scott wrote: > > On Tue, Apr 10, 2018 at 11:07 PM, Saad Khattak > wrote: > >> Hi, >> >> My

Re: [CMake] FetchContent and find_package

2018-04-10 Thread Craig Scott
On Tue, Apr 10, 2018 at 11:07 PM, Saad Khattak wrote: > Hi, > > My project is setup in such a way that I perform a FetchContent 'only if' > my find_package fails. > > This works very well until I start building different configurations. > Let's say I generate and build

[CMake] FetchContent and find_package

2018-04-10 Thread Saad Khattak
Hi, My project is setup in such a way that I perform a FetchContent 'only if' my find_package fails. This works very well until I start building different configurations. Let's say I generate and build Debug for my project. My project tries to find_package(LibA QUIET) and cannot find it. So, it