[cmake-developers] Moving from Module to Target-based linking

Daniel Wirtz daniel.wirtz at simtech.uni-stuttgart.de
Wed Oct 7 04:03:21 EDT 2015


Hey all,

is there any development going on towards providing FindXXX.cmake 
wrapper modules that "convert" MODULE-mode results into CONFIG style 
imported targets to consume?
correct me if i'm wrong here, but as more and more projects are being 
cmake'ified and the config-mode is far more robust to
manage package-interdependencies, wouldn't it fuel this progress if 
there was some sort of automatic imported target creation possible?

i've attached a template that is cmake-configured and has thus far been 
able to work with all the 3rd party packages we've got involved (it's 
also got some specific stuff - ignore).
it basically invokes the module mode and sets found libraries and paths 
to an imported target (named after what was looked for)
which then can be consumed, much like the generated config files do.

if this is of general interest, i'm happy for some feedback and 
suggestions how that could be of use in CMake.

- Daniel

-- 
Dr. Daniel Wirtz
Dipl. Math. Dipl. Inf.
SRC SimTech
Pfaffenwaldring 5a
+49 711 685 60044

-------------- next part --------------
A non-text attachment was scrubbed...
Name: FindXXX.template.cmake
Type: text/x-cmake
Size: 9385 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151007/7aa9f67c/attachment-0001.bin>


More information about the cmake-developers mailing list