[CMake] Finding ${prefix}install_name_tool in cross compilation

Alaric Senat senat.alaric at gmail.com
Fri Oct 6 05:48:33 EDT 2017


Hello,

I'm currently trying to compile a library from Linux to Darwin 13 with
clang and I am facing a strange
issue. When CMake is trying to find the tools it needs in addition to clang
(ar, ranlib, etc.) CMake
can't find the install_name_tool binary just because it has a prefix like
all the other tool.

The way Cmake search for *install_name_tool *in the *CMakeFindBinUtils.cmake
*file looks like this:

*find_program(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool HINTS
${_CMAKE_TOOLCHAIN_LOCATION})*

And for *ranlib* for example:

*find_program(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib HINTS
${_CMAKE_TOOLCHAIN_LOCATION})*

So, to find install_name_tool, cmake is not adding the prefix before, and
that's a big issue for me,
each compilators tools has a prefix in my '.../bin' directory ! Do you
think that this prefix missing in
the finding of install_name_tool is intended or is it just an oversight ?

Sincerely,
Aalric SENAT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20171006/9a7fd72e/attachment.html>


More information about the CMake mailing list