Skip to content
Permalink
Browse files

cmake: only link SetupAPI on win32 if it's found

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
  • Loading branch information
rkitover committed Apr 15, 2019
1 parent af63a11 commit d28fd302aa2bcfa94999495eb968d8a4f5c9ed9d
Showing with 5 additions and 1 deletion.
  1. +5 −1 CMakeLists.txt
@@ -220,7 +220,11 @@ find_package(SDL2 REQUIRED)
add_definitions(${SDL2_DEFINITIONS})

if(WIN32)
set(SDL2_LIBRARY ${SDL2_LIBRARY} -lSetupAPI)
find_library(SETUPAPI_LIBRARY SetupAPI)

if(SETUPAPI_LIBRARY)
set(SDL2_LIBRARY ${SDL2_LIBRARY} ${SETUPAPI_LIBRARY})
endif()
endif()

if(ENABLE_LINK)

0 comments on commit d28fd30

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