mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 03:29:18 -05:00
FindSDL: Add -mwindows to link flags for MinGW, correct wording
The `-mwindows` flag is needed to avoid creating an additional console window when starting SDL applications built with MinGW. There is no `mwindows` library. See also https://cygwin.com/ml/cygwin/2007-04/msg00027.html
This commit is contained in:
@@ -122,11 +122,10 @@ if(NOT APPLE)
|
|||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# MinGW needs an additional library, mwindows
|
# MinGW needs an additional link flag, -mwindows
|
||||||
# It's total link flags should look like -lmingw32 -lSDLmain -lSDL -lmwindows
|
# It's total link flags should look like -lmingw32 -lSDLmain -lSDL -mwindows
|
||||||
# (Actually on second look, I think it only needs one of the m* libraries.)
|
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
set(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
|
set(MINGW32_LIBRARY mingw32 "-mwindows" CACHE STRING "link flags for MinGW")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SDL_LIBRARY_TEMP)
|
if(SDL_LIBRARY_TEMP)
|
||||||
|
|||||||
Reference in New Issue
Block a user