[cmake-developers] Setting include directories via target_link_libraries() ?
Stephen Kelly
steveire at gmail.com
Thu Dec 6 15:37:37 EST 2012
Alexander Neundorf wrote:
> Hi,
>
> I haven't followed the long thread between Brad and Stephen about
> importing and exporting targets closely...
>
> So, if I understand correctly, in the future the following cmake code
>
> find_package(Foo)
>
> add_executable(hello main.cpp)
>
> target_link_libraries(hello ${Foo_LIBRARIES})
>
>
> may also set include directories ?
For reference, here is where the idea of using target_link_libraries for
that came up:
http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/3083/focus=3093
(though Clinton later said he liked target_use_targets).
Here's a point where Alex raised a similar concern:
http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/2145/focus=2154
Here's where I changed my mind on whether we should use target_use_targets
or target_link_libraries:
http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/3615/focus=5111
I'm not sure what has changed since then.
Thanks,
Steve.
More information about the cmake-developers
mailing list