<p dir="ltr">That's an interesting script. If you look at the bundled modules, some are gradually being converted to use imported targets: off the top of my head, I know glut is one. Not sure a template like yours will make it into the standard distribution, there are just too many special cases and weird libraries, but it certainly could be helpful in the conversion process.</p>
<p dir="ltr">One bug I noticed in your template: while it's converting frameworks to link differently (a catch I recently hit, as apparently linking to the library symlinks by full path no longer works), it's also stripping all location information from them, so it will only work with frameworks already in the search path, if I'm not mistaken.</p>
<p dir="ltr">Happy to learn the correct way to make an imported target for a found framework if someone cares to enlighten :)</p>
<p dir="ltr">Ryan</p>
<br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 7, 2015, 3:04 AM Daniel Wirtz <<a href="mailto:daniel.wirtz@simtech.uni-stuttgart.de">daniel.wirtz@simtech.uni-stuttgart.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey all,<br>
<br>
is there any development going on towards providing FindXXX.cmake<br>
wrapper modules that "convert" MODULE-mode results into CONFIG style<br>
imported targets to consume?<br>
correct me if i'm wrong here, but as more and more projects are being<br>
cmake'ified and the config-mode is far more robust to<br>
manage package-interdependencies, wouldn't it fuel this progress if<br>
there was some sort of automatic imported target creation possible?<br>
<br>
i've attached a template that is cmake-configured and has thus far been<br>
able to work with all the 3rd party packages we've got involved (it's<br>
also got some specific stuff - ignore).<br>
it basically invokes the module mode and sets found libraries and paths<br>
to an imported target (named after what was looked for)<br>
which then can be consumed, much like the generated config files do.<br>
<br>
if this is of general interest, i'm happy for some feedback and<br>
suggestions how that could be of use in CMake.<br>
<br>
- Daniel<br>
<br>
--<br>
Dr. Daniel Wirtz<br>
Dipl. Math. Dipl. Inf.<br>
SRC SimTech<br>
Pfaffenwaldring 5a<br>
+49 711 685 60044<br>
<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake-developers</a></blockquote></div>