mirror of
https://github.com/encounter/SDL.git
synced 2025-06-29 09:53:28 +00:00
cmake: Fix test linking with MinGW
This commit is contained in:
parent
618b0d414f
commit
77141e84e0
@ -6,9 +6,14 @@ project(SDL2 C)
|
|||||||
remove_definitions(-DUSING_GENERATED_CONFIG_H)
|
remove_definitions(-DUSING_GENERATED_CONFIG_H)
|
||||||
link_libraries(SDL2_test SDL2-static)
|
link_libraries(SDL2_test SDL2-static)
|
||||||
|
|
||||||
# FIXME: Parent directory CMakeLists.txt only sets these for mingw/cygwin,
|
|
||||||
# but we need them for VS as well.
|
|
||||||
if(WINDOWS)
|
if(WINDOWS)
|
||||||
|
# mingw32 must come before SDL2main to link successfully
|
||||||
|
if(MINGW OR CYGWIN)
|
||||||
|
link_libraries(mingw32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# FIXME: Parent directory CMakeLists.txt only sets these for mingw/cygwin,
|
||||||
|
# but we need them for VS as well.
|
||||||
link_libraries(SDL2main)
|
link_libraries(SDL2main)
|
||||||
add_definitions(-Dmain=SDL_main)
|
add_definitions(-Dmain=SDL_main)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user