On 07/18/2014 05:00 AM, Walter Gray wrote:
Hi list!

I'm a big fan of the new INTERFACE targets & target usage requirements,
but none of the provided Find<package>.cmake files seem to take
advantage of the new paradigm.  Checking the wiki, the old
Find<package>.cmake seem to be deprecated, with most of the information
on authoring new packages assuming that you are the developer of the
module, not the consumer. What is the recommended way to deal with
packages that don't provide these config files? I'll happily write my
own Find<package>.cmake files, however that approach seems deprecated
and I haven't found any good examples of find modules that define IMPORT
or INTERFACE targets instead of the older method of setting a bunch of
<package>_xxx variables.

There are a few modules that use imported targets in 3.0 and a few more were updated in master.

I see e.g. FindGLUT, FindQt4, FindGTK2, FindZLIB, FindOpenGL and FindGLEW making use of imported targets in master[1].

[2] documents how to write find modules and includes an example with IMPORTED targets.

Nils

[1] http://cmake.org/gitweb?p=cmake.git;a=tree;f=Modules;h=5d17682cb231f119b677ce67d804852d3be6d46f;hb=HEAD

[2] http://www.cmake.org/cmake/help/git-master/manual/cmake-developer.7.html#find-modules
--

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