build/cmake: add hidapi include directory on libusb platforms as well

3rdparty/hidapi/libusb/hid.c:52:10: fatal error: 'hidapi.h' file not found
 #include "hidapi.h"
          ^~~~~~~~~~
This commit is contained in:
Jan Beich 2018-09-21 19:23:19 +00:00 committed by Ivan
parent dafc914bcc
commit 1133fbb017

View File

@ -80,6 +80,8 @@ elseif(WIN32)
target_link_libraries(3rdparty_hidapi INTERFACE hidapi-hid Shlwapi.lib)
else()
add_subdirectory(hidapi/libusb EXCLUDE_FROM_ALL)
target_include_directories(hidapi-libusb PUBLIC hidapi/hidapi)
target_link_libraries(3rdparty_hidapi INTERFACE hidapi-libusb usb)
endif()