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