[CMake] Find* and cross compiling

E. Wing ewmailing at gmail.com
Sat Dec 29 20:13:17 EST 2007


On 12/28/07, Rodolfo Lima <rodolfo at rodsoft.org> wrote:
> On Fri, Dec 28, 2007 at 05:40:59PM -0800, E. Wing wrote:
> > I didn't know cross-compiling was a feature now.
>
> Yes, works very well once you provide a 'toolchain file' with the correct
> setup.
>
> > But the FindLua, FindFreeType modules should be fine. According to the
> > documentation, the listed paths should only be searched last, after
> > all other CMake standard paths have been searched. If those paths are
> > being picked up, it means nothing in the standard environment produced
> > a hit.
>
> But then something would be found that wasn't compiled for the target. The
> scripts should make <LIB>_FOUND false. The standard paths you specify are
> already taken in consideration by cmake as long you don't pass
> NO_DEFAULT_PATHS to find_library/path. And it manages them quite well in a
> cross-compiling build.
>
> > Note that my modules do respond to special environmental variables
> > specific to each library and are searched first, so if you set those,
> > you can guarantee which libraries get picked up.
>
> I've noticed, but sometimes I want to set those variables inside a cmake
> script, but this functionality isn't available. I can't set a $ENV{...}.
>
> Regards,
> rod
>


More information about the CMake mailing list