[CMake] cross compiling and find_XX functions

Jack Smith smith.jack.sidman at gmail.com
Mon Feb 10 14:01:02 EST 2014


I understand the cross-compile process reasonably well. I also have a
fairly good feel for ExternalProject_Add, What I'm trying to do is combine
these ideas but, I am confused about one general issue.

While I am cross-compiling the Linux kernel, I discover that the kernel
requires zlib.  So, I add an external project dependecy, and cross compile
zlib, but then how do I get the cross-compile environment to know about it
?  Should I install it into my target sysroot ?  If so, how do I reference
the path from within a CMakeLists.txt, particualry if it won't exist until
the build stage.  Won't the configure or generate stage fail because it's
not there ?

Also, a separate but related issue, when I cross compile grub, it requires
python in order to be built (the autogen.sh script relies upon python).  I
know I can download and install python, except, I'd like to keep my Build
machine clean.  I would like to have python (in this example) installed
within my cross-compile project directory tree (somewhere), so how do I
install that, and how would I inform CMake where it will eventually reside
without it already being there ? (similar to the issue in the first
question)

Is this issue discussed somewhere already ?  I have searched for a few
days, but maybe my searches are not including the right keyword to find the
answers.

Thanks,
Jack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140210/75252c6c/attachment.html>


More information about the CMake mailing list