[cmake-developers] [Review Request] Topic CMakePackageConfigHelpers_build_tree

Daniele E. Domenichelli daniele.domenichelli at gmail.com
Wed Jul 30 11:57:59 EDT 2014


Hello Brad,

On 30/07/14 15:32, Brad King wrote:
> Thanks.  While reviewing the commits in 'next' again I realized
> that assuming paths are relative to CMAKE_BINARY_DIR may not be
> correct.  Some projects may be nested inside others, and the
> CMAKE_BINARY_DIR may not be the proper location for a nested
> project.  Instead the BUILD_TREE option should be followed by
> another argument specifying the base for relative paths, i.e.
> the in-build-tree prefix.


Ok, looks reasonable but I have a few questions...


I never used multiple project calls, so I don't know how it works, would
PROJECT_BINARY_DIR be an appropriate replacement for CMAKE_BINARY_DIR?


configure_package_config_file has an INSTALL_DESTINATION argument, I was
assuming that one would pass that if the destination isn't of the config
file isn't CMAKE_BINARY_DIR. In this way if INSTALL_DESTINATION is a
relative path, it will consider it relative to CMAKE_BINARY_DIR, like
other places in CMake.
How would you like me to handle this argument? Should
INSTALL_DESTINATION always be relative to CMAKE_BINARY_DIR or should it
be relative to BUILD_TREE?


Maybe BUILD_TREE is no longer an appropriate name if you can set it to
any folder, maybe RELATIVE_DIR or something similar would be more
appropriate?


Cheers,
 Daniele



More information about the cmake-developers mailing list