Don't use hidapi-hidraw without udev.
This commit is contained in:
parent
7fa14169e9
commit
8970c1a793
|
@ -754,15 +754,22 @@ if(NOT ANDROID)
|
||||||
include_directories(${HIDAPI_INCLUDE_DIRS})
|
include_directories(${HIDAPI_INCLUDE_DIRS})
|
||||||
list(APPEND LIBS ${HIDAPI_LIBRARIES})
|
list(APPEND LIBS ${HIDAPI_LIBRARIES})
|
||||||
else()
|
else()
|
||||||
|
set(HIDAPI_FOUND 1)
|
||||||
include_directories(Externals/hidapi/hidapi)
|
include_directories(Externals/hidapi/hidapi)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
message(STATUS "Using static hidapi from Externals")
|
message(STATUS "Using static hidapi from Externals")
|
||||||
add_subdirectory(Externals/hidapi/mac)
|
add_subdirectory(Externals/hidapi/mac)
|
||||||
list(APPEND LIBS hidapi)
|
list(APPEND LIBS hidapi)
|
||||||
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
message(STATUS "Using static hidapi-hidraw from Externals")
|
find_package(Libudev)
|
||||||
add_subdirectory(Externals/hidapi/linux)
|
if(LIBUDEV_FOUND)
|
||||||
list(APPEND LIBS hidapi-hidraw udev)
|
message(STATUS "Using static hidapi-hidraw from Externals")
|
||||||
|
add_subdirectory(Externals/hidapi/linux)
|
||||||
|
list(APPEND LIBS hidapi-hidraw udev)
|
||||||
|
else()
|
||||||
|
message(STATUS "Could not find udev, disabling hidapi")
|
||||||
|
set(HIDAPI_FOUND 0)
|
||||||
|
endif()
|
||||||
elseif(MSVC)
|
elseif(MSVC)
|
||||||
message(STATUS "Using static hidapi-hid from Externals")
|
message(STATUS "Using static hidapi-hid from Externals")
|
||||||
add_subdirectory(Externals/hidapi/windows)
|
add_subdirectory(Externals/hidapi/windows)
|
||||||
|
@ -773,8 +780,9 @@ if(NOT ANDROID)
|
||||||
list(APPEND LIBS hidapi-libusb)
|
list(APPEND LIBS hidapi-libusb)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
set(HIDAPI_FOUND 1)
|
if(HIDAPI_FOUND)
|
||||||
add_definitions(-DHAVE_HIDAPI=1)
|
add_definitions(-DHAVE_HIDAPI=1)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT DISABLE_WX)
|
if(NOT DISABLE_WX)
|
||||||
|
|
Loading…
Reference in New Issue