Re: [hatari-devel] cmake and cross-compiling

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


On 28/12/2012 12:32, Christer Solskogen wrote:
On Thu, Dec 27, 2012 at 10:39 PM, Nicolas Pomarède
<npomarede@xxxxxxxxxxxx> wrote:
it's not the compiler that cmake doesn't find, it's the mingw version of
sdl, zlib, libpng and other libraries.


Yes, I know. The thing is that cmake for some wrong reasons looks for
those libraries (and headers) even if the compiler is sysroot-aware.
So thats a fault by cmake, not hataris configuration of cmake.
But as a workaround, what about setting CMAKE_FIND_ROOT_PATH to
"CMAKE_C_COMPILER -print-sysroot"?


Hello

I tried that, but it doesn't work in my case.

For my setup, CMAKE_FIND_ROOT_PATH=/usr/i586-pc-mingw32/sys-root/mingw but "${CMAKE_C_COMPILER} -print-sysroot" returns "/usr/i586-pc-mingw32/sys-root", so the "/mingw" part of the path is missing.

What do you get on your setup ?

I have the feeling this doesn't really follow a standard on all linux distros, so doing it automatically might be complicated (in my case, I don't see how to determine automatically that "/mingw" should be appended to "${CMAKE_C_COMPILER} -print-sysroot".

Nicolas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/