diff options
author | Emil Laine <emil.laine@cs.helsinki.fi> | 2016-09-15 12:29:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-10-12 12:49:16 (GMT) |
commit | 632326a7c762aa039d245a506553c9f06d23cd10 (patch) | |
tree | 4af552be5ff92286244de6d05a2437ae899b6f74 /Modules/FindSDL.cmake | |
parent | 2fb8e5b1c46ea586233b19e612ba174aa74d004c (diff) | |
download | CMake-632326a7c762aa039d245a506553c9f06d23cd10.zip CMake-632326a7c762aa039d245a506553c9f06d23cd10.tar.gz CMake-632326a7c762aa039d245a506553c9f06d23cd10.tar.bz2 |
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
Diffstat (limited to 'Modules/FindSDL.cmake')
-rw-r--r-- | Modules/FindSDL.cmake | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/FindSDL.cmake b/Modules/FindSDL.cmake index c0cdd98..4e4411f 100644 --- a/Modules/FindSDL.cmake +++ b/Modules/FindSDL.cmake @@ -122,11 +122,10 @@ if(NOT APPLE) find_package(Threads) endif() -# 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.) +# MinGW needs an additional link flag, -mwindows +# It's total link flags should look like -lmingw32 -lSDLmain -lSDL -mwindows if(MINGW) - set(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW") + set(MINGW32_LIBRARY mingw32 "-mwindows" CACHE STRING "link flags for MinGW") endif() if(SDL_LIBRARY_TEMP) |