Hi,
I've been looking into a patch to add an include directory automatically
when a framework is used. For example:
target_link_libraries(sometarget LINK_PRIVATE ${FOO})
if ${FOO}/.. is a framework path, then add ${FOO}/.. to the
INCLUDE_DIRECTORIES of sometarget (at generate time).
This means that if I use
target_link_libraries(sometarget
LINK_PUBLIC /path/to/prefix/lib/QtCore.framework/QtCore)
I can use #include <QtCore/QString> without using any addtional commands to
add include directories. That is true transitively because I used
LINK_PUBLIC in the above example. Each dependent target will add the
framework path to its own INCLUDE_DIRECTORIES.
Of course, using Qt5Core for this example does not make sense because a
more-useful IMPORTED target is provided for that.
This idea came from
http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/7260/focus=7283
The question is whether this is a worthwhile feature for cmake?
Thanks,
Steve.
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers