On 07/30/2014 11:57 AM, Daniele E. Domenichelli wrote:
> 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?
No, because we don't know if the most-nested project() call is the
right one either.
> Should INSTALL_DESTINATION always be relative to CMAKE_BINARY_DIR or
> should it be relative to BUILD_TREE?
The purpose of INSTALL_DESTINATION is to help the generated file
compute the installation prefix relative to itself. Therefore it
needs to be treated relative to the same place all other paths
will be treated relative to. This is BUILD_TREE when the option
is specified.
> 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?
The purpose of the BUILD_TREE option is now to specify a different
value to be used anywhere ${CMAKE_INSTALL_PREFIX} is now. I think
the name "INSTALL_PREFIX" may be best. This approach generalizes
the feature even to the case of preparing a package config file
for a prefix besides the current value of CMAKE_INSTALL_PREFIX
even when it really will be installed.
Basically in the implementation you can replace any occurence of
${CMAKE_INSTALL_PREFIX} with a ${installPrefix} local that is set
to either CMAKE_INSTALL_PREFIX or the value of the INSTALL_PREFIX
option.
-Brad
--
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