Skip to content
Permalink
Browse files

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>
  • Loading branch information
rkitover committed Apr 15, 2019
1 parent 04c77a2 commit af63a1194fdb3270bf39b7da214afafd200ec123
Showing with 4 additions and 0 deletions.
  1. +4 −0 CMakeLists.txt
@@ -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

0 comments on commit af63a11

Please sign in to comment.
You can’t perform that action at this time.