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

Werner Smekal smekal at iap.tuwien.ac.at
Tue Mar 13 15:18:40 EST 2007


Hi,

> Ok, so I just tested you proposal. What I did:
>  
> - launched CMake,
> - selected MINGW,
> - configured a few variables (QT_QMAKE_EXECUTABLE, 
> SDLIMAGE_INCLUDE_DIR, SDLIMAGE_LIBRARY, SDL_INCLUDE_DIR, SDLMAIN_LIBRARY).
> - generated the makefiles.
Did you make sure, that you started with a clean build directory? I 
always build out-of-source, e.g. in a separate build directory and 
especially if I use 2 or more different compilers these directories are 
named different (buildcygwin, buildmingw, buildnmake, buildwatcom, etc.)
>  
> - click on start menu, and click on the launcher.
> - launched "cmd" (I suppose that this is what you called Windows CLI)
Yes, cmd.exe is the the Windows command line interface.
> - went to the directory
> - launched "mingw32-make.exe"
>  
> And the error is the same as before. The "build.make" is the same as 
> before (I copied the linking part at the end of this mail).
> Any idea?

Try with a clean build directory if you didn't do it, and if you build 
in-source than svn a new copy of you project to get rid of all stale 
cache files which might lurk around.
>  
> I would like to check the value of the variables in the FindSDL.cmake 
> (like "MINGW"...) when I try to compile
> my program. Is this possible?
Do you mean something like that:

message(
"UNIX:            ${UNIX}
WIN32:            ${WIN32}
APPLE:            ${APPLE}
MSVC:            ${MSVC}    (MSVC_VERSION:    ${MSVC_VERSION})
MINGW:            ${MINGW}
MSYS:            ${MSYS}
CYGWIN:            ${CYGWIN}
BORLAND:        ${BORLAND}
WATCOM:          ${WATCOM}"
)

>  
> Can the problem be relevant to the fact that I am using the MINGW 
> version coming with Qt ?
QT provides it's own MinGW version? But this shouldn't be a problem. The 
difference between MinGW and MSYS is mainly the environment (cmd.exe and 
bash.exe) not the compiler - which is in fact the same.

BTW, you can get a verbose output of the make process via the VERBOSE=1 
option, e.g.
mingw32-make VERBOSE=1
you get all the details about which flag is used or not used.

Regards,
Werner



More information about the CMake mailing list