[CMake] Correct way of using CMAKE_FIND_ROOT_PATH_MODE_*?

Chaoren Lin aoe at google.com
Tue Aug 9 14:36:39 EDT 2016


Hi,

the documentation regarding cross-compiling
<https://cmake.org/cmake/help/v3.6/manual/cmake-toolchains.7.html#cross-compiling>
says
that CMAKE_FIND_ROOT_PATH_MODE_* are usually set to ONLY to prevent
searching for libraries on the host. But this also prevents finding
libraries via absolute path or relative path to the project.

Is there a way to prevent searching host sysroot (/usr/lib, /usr/include,
etc), while still allowing find_library via absolute paths or paths
relative to the project?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160809/ef525810/attachment.html>


More information about the CMake mailing list