Use the windows HID finder
This commit is contained in:
@@ -27,8 +27,16 @@ include(UseBackportedModules)
|
||||
add_definitions(-DWIIUSE_COMPILE_LIB)
|
||||
|
||||
if(NOT WIN32 AND NOT APPLE)
|
||||
set(LINUX YES)
|
||||
find_package(Bluez REQUIRED)
|
||||
include_directories("${BLUEZ_INCLUDE_DIRS}")
|
||||
include_directories(${BLUEZ_INCLUDE_DIRS})
|
||||
else()
|
||||
set(LINUX NO)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
find_package(WinHID REQUIRED)
|
||||
include_directories(${WINHID_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
###
|
||||
|
||||
@@ -24,17 +24,18 @@ set(API
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND SOURCES io_win.c)
|
||||
list(APPEND API ../msvc-stdint/stdint.h)
|
||||
else()
|
||||
list(APPEND SOURCES io_nix.c)
|
||||
endif()
|
||||
|
||||
|
||||
if(MSVC)
|
||||
list(APPEND API ../msvc-stdint/stdint.h)
|
||||
endif()
|
||||
|
||||
add_library(wiiuse SHARED ${SOURCES} ${API})
|
||||
if(WIN32)
|
||||
target_link_libraries(wiiuse Ws2_32.lib hid.lib setupapi.lib)
|
||||
else()
|
||||
target_link_libraries(wiiuse Ws2_32.lib ${WINHID_LIBRARIES} setupapi.lib)
|
||||
elseif(LINUX)
|
||||
target_link_libraries(wiiuse m ${BLUEZ_LIBRARIES})
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user