>> Honestly, headers seem sometimes a second class citizen in cmake: there
>> are some properties related to headers but few header knowledgeable
>> commands...
> I really don't see how CMake could automate this any more, or what
> additional information it could generate for you.
Well, since you asked: it *would* be nice if cmake would know about the
headers needed by a target, or even support header-only targets. Currently
it feels like an artificial divide between shared object files and header
files:
# find required dependency which correctly sets up import targets:
find_package(BAR)
# additional step for headers (with side-effects for other targets)...
include_directories(${BAR_INCLUDE_DIRS})
# ... that is not needed (and in fact discouraged) for libs:
#NO: link_directories(${BAR_LIBRARY_DIRS})
target_link_libraries(foo bar)
To be fair though, most other build-systems are not any better at
handling header files. And since this feature request has already been
discussed in http://public.kitware.com/Bug/view.php?id=115, I'm content
with it only being deferred, not dismissed...
--
Johannes Zarl
Virtual Reality Services
Johannes Kepler University
Informationsmanagement
Altenbergerstrasze 69
4040 Linz, Austria
Phone: +43 732 2468-8321
[email protected]
http://vrc.zid.jku.at
_______________________________________________
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://www.cmake.org/mailman/listinfo/cmake