Re: [CMake] Generator Expressions and FetchContent

2018-03-19 Thread Saad Khattak
I do use target_link_libraries when it comes to C++ projects and it works wonderfully for them. However, in this case, my base project has a bunch of helper files with CMake functionality that help me work with and build my library of projects (which you can see here https://github.com/2LoC/tl_base

Re: [CMake] Generator Expressions and FetchContent

2018-03-19 Thread Craig Scott
On Mon, Mar 19, 2018 at 8:25 AM, Saad Khattak wrote: > Thank you for the clarification Craig. > > >> If you made your main target link against LibA, you'd see that CMake > automatically expands out the generator expressions when it constructs the > link command line for main, so the example as it

Re: [CMake] Generator Expressions and FetchContent

2018-03-18 Thread Saad Khattak
Thank you for the clarification Craig. >> If you made your main target link against LibA, you'd see that CMake automatically expands out the generator expressions when it constructs the link command line for main, so the example as it stands doesn't actually have any error. In my actual project,

Re: [CMake] Generator Expressions and FetchContent

2018-03-18 Thread Craig Scott
On Mon, Mar 19, 2018 at 3:44 AM, Saad Khattak wrote: > Absolutely. Please find the example project here: https://github.com/ > samaursa/cmake_fetch_content_and_generator_expressions > > The repository README also includes the output from running `./setup.sh`. > Okay that's much clearer, thanks.

Re: [CMake] Generator Expressions and FetchContent

2018-03-18 Thread Saad Khattak
Absolutely. Please find the example project here: https://github.com/samaursa/cmake_fetch_content_and_generator_expressions The repository README also includes the output from running `./setup.sh`. On Sat, Mar 17, 2018 at 6:47 PM Craig Scott wrote: > Can you provide a small project example that

Re: [CMake] Generator Expressions and FetchContent

2018-03-17 Thread Craig Scott
Can you provide a small project example that can be used to demonstrate your problem? The specifics of how you are doing things may be important. On Sun, Mar 18, 2018 at 8:12 AM, Saad Khattak wrote: > Hi, > > ExternalProject_Add builds, generates and installs and thus any generator > expression

[CMake] Generator Expressions and FetchContent

2018-03-17 Thread Saad Khattak
Hi, ExternalProject_Add builds, generates and installs and thus any generator expressions used will be expanded by the time another library uses it. For example, if I add a library LibA using ExternalProject_Add, I can then query the target property INTERFACE_INCLUDE_DIRECTORIES and get the inclu