CPack: re-use paths of tools discovered by CMakeFindBinUtils
CMakeFindBinUtils.cmake
sets CMAKE_<TOOL>
variables that in cross-compilation environments point to the toolchain specific executables: e.g. CMAKE_OBJCOPY
might point to <path_to_toolchain>/arm-poky-linux-gnueabi-objcopy
.
However, such variables are not exposed to CPack. This merge request is to let CPack internal modules re-use (a subset) of the already defined CMAKE_ variables.
I am not sure whether this is best method to do so, I guess that another method might be to let the internal CPack module use the HINTS ${_CMAKE_TOOLCHAIN_LOCATION}
find option as the CMakeFindBindUtils.cmake already does.
Also, please consider that I am new to cmake development and I might not have considered all the implications. Hope this helps anyway.
Edited by Brad King