[CMake] CMAKE_SYSROOT

dbegun dbegun at protonmail.com
Tue Jul 3 08:58:27 EDT 2018


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=/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?

Sent with [ProtonMail](https://protonmail.com) Secure Email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180703/a9d69c3f/attachment-0001.html>


More information about the CMake mailing list