MinGW: Allow to compile wiiuse.

Still disabled by default because it requires mingw-w64 and it may not work with other versions.
This commit is contained in:
Deve 2015-03-31 19:27:07 +02:00
parent cd67daf4a3
commit 5e56f8904a
3 changed files with 5 additions and 4 deletions

View File

@ -19,7 +19,7 @@ option(USE_WIIUSE "Support for wiimote input devices" ON)
option(USE_FRIBIDI "Support for right-to-left languages" ON)
option(CHECK_ASSETS "Check if assets are installed in ../stk-assets" ON)
if(MSVC OR MINGW)
if(MSVC)
# Normally hide the option to build wiiuse on VS, since it depends
# on the installation of the Windows DDK (Driver Developer Kit),
# which also needs an absolute path :(

View File

@ -38,7 +38,7 @@ if(APPLE)
)
endif()
if(MSVC)
if(WIN32)
add_definitions("/DWIIUSE_STATIC")
add_library(wiiuse STATIC ${WIIUSE_SOURCES})
else()
@ -81,5 +81,6 @@ if(MSVC)
else()
set_target_properties(wiiuse PROPERTIES STATIC_LIBRARY_FLAGS "setupapi.lib hid.lib")
endif()
elseif(MINGW)
target_link_libraries(wiiuse hid setupapi)
endif()

View File

@ -48,7 +48,7 @@
# ifdef __cplusplus
extern "C" {
# endif
WINHIDSDI BOOL WINAPI HidD_SetOutputReport(HANDLE, PVOID, ULONG);
HIDAPI BOOL NTAPI HidD_SetOutputReport(HANDLE, PVOID, ULONG);
# ifdef __cplusplus
}
# endif