[CMake] Re: FindSDL.cmake and mingw / msys
PA Galmes
pagalmes.lists at gmail.com
Tue Mar 13 12:33:18 EST 2007
>
>
>
> On 3/13/07, Werner Smekal <smekal at iap.tuwien.ac.at> wrote:
>
> > Hi,
>
>
> Hi Wermer
>
>
>
> > 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.
>
>
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.
- click on start menu, and click on the launcher.
- launched "cmd" (I suppose that this is what you called Windows CLI)
- 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?
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?
Can the problem be relevant to the fact that I am using the MINGW version
coming with Qt ?
> 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.
>
>
>
Currently, I suppose that the first issue is not related to that, as even
with
MINGW it does not work...
Any idea?
the build.make:
# External object files for target bloodybeard
bloodybeard_EXTERNAL_OBJECTS =
bloodybeard.exe: CMakeFiles/bloodybeard.dir/main.obj
bloodybeard.exe: CMakeFiles/bloodybeard.dir/qGameEngine.obj
bloodybeard.exe: CMakeFiles/bloodybeard.dir/moc_qGameEngine.obj
bloodybeard.exe: lib/SDL_image.lib
bloodybeard.exe: lib/libSDLmain.a
bloodybeard.exe: C:/Qt/4.2.1/lib/libQtCore4.a
bloodybeard.exe: CMakeFiles/bloodybeard.dir/build.make
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold
"Linking CXX executable bloodybeard.exe"
$(CMAKE_COMMAND) -P CMakeFiles\bloodybeard.dir\cmake_clean_target.cmake
C:\MinGW\bin\g++.exe $(bloodybeard_OBJECTS)
$(bloodybeard_EXTERNAL_OBJECTS) -o
bloodybeard.exe-Wl,--major-image-version,0,--minor-image-version,0
-Le:\dev\bloodybeard\bloodybeard\trunk\src\lib -Lc:\Qt\4.2.1\lib -lSDL_image
-Wl,-Bstatic -lSDLmain -lQtCore4 -Wl,-Bdynamic -lWs2_32
--
Pierre-André Galmes
Free Software consultant
StarXpert - www.starxpert.fr
6, rue Eugène Varlin - 75010 Paris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070313/8b095721/attachment.htm
More information about the CMake
mailing list