cmake: add -lSetupAPI to SDL2 libs for win32

Fix for undefined reference errors linking for msys2 mingw build using
the scripts.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2019-04-15 03:28:18 +00:00
parent 04c77a267f
commit af63a1194f
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 4 additions and 0 deletions

View File

@ -219,6 +219,10 @@ endif()
find_package(SDL2 REQUIRED)
add_definitions(${SDL2_DEFINITIONS})
if(WIN32)
set(SDL2_LIBRARY ${SDL2_LIBRARY} -lSetupAPI)
endif()
if(ENABLE_LINK)
# msys2 does not have static sfml libs atm
# while on mxe we use static libs