[CMake] Re: FindSDL.cmake and mingw / msys

E. Wing ewmailing at gmail.com
Tue Mar 13 14:05:03 EST 2007


Hi Werner,
I was curious if you saw any other glaring problems with the
FindSDL.cmake module, particularly with the Msys and MinGW stuff? I
put most of that together by trial and error without really any
understanding of it (like what do mingw32 and mwindows libraries
provide). And obviously I never separated Msys and MinGW. (I never
managed to get MinGW to do anything useful for me without Msys.)

Thanks,
Eric


> From: Werner Smekal <smekal at iap.tuwien.ac.at>
> Subject: Re: [CMake] Re: FindSDL.cmake and mingw / msys
> To: PA Galmes <pagalmes.lists at gmail.com>
> Cc: cmake at cmake.org
> Message-ID: <45F67FAD.4030804 at iap.tuwien.ac.at>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Hi,
>
> reading the bug report, the problem is:
>
> # MinGW needs an additional library, mwindows
> # It's total link flags should look like -lmingw32 -lSDLmain -lSDL
> -lmwindows
> # (Actually on second look, I think it only needs one of the m* libraries.)
> IF(MINGW)
>   SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
> ENDIF(MINGW)
>
> MSYS!=MINGW for CMake for good reasons. The best solution would be to
> use the MinGW compiler within normal Windows CLI, since it's so much
> faster than MSYS, you won't regret it. Another solution would be to
> change the lines above to
>
> IF(MINGW AND MSYS)
>   SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
> ENDIF(MINGW AND MSYS)
>
> and similar code in  FindSDL.cmake. This should work  than.
>
> Regards,
> Werner
>
>
> PA Galmes wrote:


More information about the CMake mailing list