Daniele E. Domenichelli wrote:

> On 21/07/14 14:23, Stephen Kelly wrote:
>> Can you give a more-concrete example of what the problem is?
> 
> The project is supposed to work both from build tree (using
> export(TARGETS)) and from the install tree (using install(EXPORT)).

Your example is too abstract. What is the meaning of the paths? 

What is the problem which can be solved only with CMakePackageConfigHelpers 
and can't be solved (currently) another way? Is there a first-class feature 
CMake could learn to make this stuff easier?

Here is why I am asking:

The documentation at

 
http://www.cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html#creating-packages

does not use CMakePackageConfigHelpers because for 'modern' packages, paths 
such as include directories are encoded into imported targets. Then the 
complete FooConfig.cmake file is:

 include(CMakeFindDependencyMacro)
 find_dependency(Stats 2.6.4)

 include("${CMAKE_CURRENT_LIST_DIR}/ClimbingStatsTargets.cmake")
 include("${CMAKE_CURRENT_LIST_DIR}/ClimbingStatsMacros.cmake")

and it works as both a build-location package and an install-location 
package, without using CMakePackageConfigHelpers. 

That is assuming the ClimbingStatsMacros.cmake can be generated in or copied 
to the build location. That is an easy assumption to make, because it is 
easy to do such generation or copying.

So, I am trying to find out:

 When using 'modern cmake', is there a remaining need for 
CMakePackageConfigHelpers?


Thanks,

Steve.


-- 

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-developers

Reply via email to