CMake: clean up HIDAPI build

This commit is contained in:
Michael Maltese
2017-04-24 20:06:39 -07:00
parent dd31a403db
commit 655ab9b4e2
8 changed files with 34 additions and 38 deletions

View File

@ -339,8 +339,10 @@ else()
message(STATUS "BlueZ explicitly disabled, disabling bluetooth support")
endif()
if(HIDAPI_FOUND)
if(TARGET Hidapi::Hidapi)
set(SRCS ${SRCS} HW/WiimoteReal/IOhidapi.cpp)
list(APPEND LIBS Hidapi::Hidapi)
add_definitions(-DHAVE_HIDAPI=1)
endif()
if(PORTAUDIO_FOUND)