<div dir="ltr">Perhaps you are looking for <a href="https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_ROOT_PATH.html">CMAKE_FIND_ROOT_PATH</a>, <a href="https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_ROOT_PATH_MODE_LIBRARY.html">CMAKE_FIND_ROOT_PATH_MODE_LIBRARY</a> and friends?</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 3, 2018 at 10:58 PM, dbegun via CMake <span dir="ltr"><<a href="mailto:cmake@cmake.org" target="_blank">cmake@cmake.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I am cross-compiling some code for ARM on an x86 host with cmake 3.5.1. The code has multiple dependencies, and I placed relevant cross-compiled libraries in /home/dev/arm_build. I was hoping that specifying CMAKE_SYSROOT=/<wbr>home/dev/arm_build in my CMAKE_TOOLCHAIN_FILE would prefix it to the search path of the find_* commands, so I won't have to modify existing Find*.cmake files. However, when I do that, cmake is unable to locate the compiler's libc files (my compiler also resides in /home/dev/arm_build) and is unable to compile a test program, not finding crt1.o, crti.o etc. Without specifying CMAKE_SYSROOT things work, it's just that I have to edit the Find*.cmake files. I can live with that, but any suggestions?<br></div><div><br></div><div class="m_2430530129198755134protonmail_signature_block"><div class="m_2430530129198755134protonmail_signature_block-user m_2430530129198755134protonmail_signature_block-empty"><br></div><div class="m_2430530129198755134protonmail_signature_block-proton">Sent with <a href="https://protonmail.com" target="_blank">ProtonMail</a> Secure Email.<br></div></div><div><br></div><br>-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/<wbr>listinfo/cmake</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Craig Scott<br><div>Melbourne, Australia</div><div><a href="https://crascit.com" target="_blank">https://crascit.com</a><br></div></div></div></div></div></div></div>
</div>