cmake: only link SetupAPI on win32 if it's found
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
af63a1194f
commit
d28fd302aa
|
@ -220,7 +220,11 @@ find_package(SDL2 REQUIRED)
|
||||||
add_definitions(${SDL2_DEFINITIONS})
|
add_definitions(${SDL2_DEFINITIONS})
|
||||||
|
|
||||||
if(WIN32)
|
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()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_LINK)
|
if(ENABLE_LINK)
|
||||||
|
|
Loading…
Reference in New Issue