cmake: Build HIDAPI on Windows

This commit is contained in:
Florent Castelli 2017-01-20 22:55:43 +01:00
parent 56559c51cf
commit 08d6a24bbc
2 changed files with 5 additions and 0 deletions

View File

@ -898,6 +898,10 @@ if(NOT ANDROID)
message(STATUS "Using static hidapi-hidraw from Externals") message(STATUS "Using static hidapi-hidraw from Externals")
add_subdirectory(Externals/hidapi/linux) add_subdirectory(Externals/hidapi/linux)
list(APPEND LIBS hidapi-hidraw udev) list(APPEND LIBS hidapi-hidraw udev)
elseif(MSVC)
message(STATUS "Using static hidapi-hid from Externals")
add_subdirectory(Externals/hidapi/windows)
list(APPEND LIBS hidapi-hid)
else() else()
message(STATUS "Using static hidapi-libusb from Externals") message(STATUS "Using static hidapi-libusb from Externals")
add_subdirectory(Externals/hidapi/libusb) add_subdirectory(Externals/hidapi/libusb)

View File

@ -0,0 +1 @@
add_library(hidapi-hid hid.c)