CMAKE_SYSROOT

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

CMAKE_SYSROOT

CMake mailing list
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 Secure Email.


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: CMAKE_SYSROOT

Nils Gladitz-2
On Tue, Jul 3, 2018 at 3:06 PM dbegun via CMake <[hidden email]> wrote:
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?


Nils

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: CMAKE_SYSROOT

Craig Scott-3
In reply to this post by CMake mailing list
Perhaps you are looking for CMAKE_FIND_ROOT_PATH, CMAKE_FIND_ROOT_PATH_MODE_LIBRARY and friends?

On Tue, Jul 3, 2018 at 10:58 PM, dbegun via CMake <[hidden email]> wrote:
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 Secure Email.


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake




--
Craig Scott
Melbourne, Australia

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: CMAKE_SYSROOT

CMake mailing list
Nils, Craig - thanks, yes, that helps.


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On July 3, 2018 4:15 PM, Craig Scott <[hidden email]> wrote:

Perhaps you are looking for CMAKE_FIND_ROOT_PATH, CMAKE_FIND_ROOT_PATH_MODE_LIBRARY and friends?

On Tue, Jul 3, 2018 at 10:58 PM, dbegun via CMake <[hidden email]> wrote:
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 Secure Email.


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:


Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:




--
Craig Scott
Melbourne, Australia


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake