Re: [hatari-devel] mingw-w64

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


On Thu, Sep 26, 2013 at 6:09 PM, Christer Solskogen
<christer.solskogen@xxxxxxxxx> wrote:
> On Thu, Sep 26, 2013 at 12:26 PM, Christer Solskogen
> <christer.solskogen@xxxxxxxxx> wrote:
>
>> The compiler does. If you use for instance have #include <SDL/SDL.h>
>> in your source file, the cross compiler will *not* use the one in
>> /usr/include, but will instead use the one that is located in
>> $SYSROOT.
>
> And this is where cmake is the one that causes the problem. Because
> cmake does not ask the compiler where to find the include file (or
> library, I guess) - it searches for include files itself. I'll see
> what I'll come up with during the evening. I won't promise anything,
> but hopefully you'll get a patch that we both agree on. I must admit
> that the change you did was good, since now only one toolchain file is
> needed.
>

Hm, but something is fishy here.
EXECUTE_PROCESS is never run, for some reason.
And if it ever will run, it will give false output if the cross
compiler it finds is not configured with sysroot. Alas, when it finds
SDL.h it finds /usr/include/SDL/SDL.h. Which most certainly will be
installed on your machine if you use hatari.

IF(NOT MINGW_ROOT_PATH)
  # Default value if MINGW_ROOT_PATH is not defined
  SET(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH}/mingw)

This one does not make any sense (to cmake) - it will default to this
even if MINGW_ROOT_PATH is set.
And on my system (because of the problem i described over)
CMAKE_FIND_ROOT_PATH now is defined to /mingw.

Holy fuck, I never thought it would be this hard to get some sense into cmake.


-- 
chs,



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