On Monday 15 June 2015 22:43:41 you wrote:
> Just a last question: I assume that most find module scripts distributed
> with cmake are
> not using this feature at the moment, right?

Sadly, no.

> After reading your explaination I looked at documentation for FindBoost and
> FindGTest
> which are both used in all my projects and they dont seem to provide import
> targets.
> Are there plans to update the cmake scripts distributed with CMake

On the one hand, FindPackage modules are, as far as I'm aware, slowly being 
updated to use imported targets. On the other hand, quite a few packages are 
missing a maintainer[1]. If you are using a package and want it to provide 
imported targets, I think your best bet is to propose a patch for the module 
and get it into cmake.

That said, its worth mentioning that FindPackage modules are only intended for 
"legacy" projects which do not provide a PackageConfig.cmake file. If you are 
writing a new project, especially if it's based on cmake, you should write a 
PackageConfig.cmake file instead [2].

> or is it just assumed that projects willing to use importing targets will
> write them somewhere before using them?

Creating imported targets on your own is not the way to go. Better file a bug 
report or write a patch to add the functionality and get that into cmake.
IMO, until the official module provides imported targets, you're better off 
using 
the old way.

Cheers,
  Johannes

[1] http://www.cmake.org/Wiki/CMake:Module_Maintainers#List
[2] http://www.cmake.org/Wiki/CMake/Tutorials#CMake_Packages
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to