mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 01:49:33 -06:00
CMake: clean up HIDAPI build
This commit is contained in:
20
Externals/hidapi/CMakeLists.txt
vendored
Normal file
20
Externals/hidapi/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
project(hidapi)
|
||||
|
||||
add_library(hidapi STATIC hidapi/hidapi.h)
|
||||
target_include_directories(hidapi PUBLIC hidapi)
|
||||
|
||||
if(APPLE)
|
||||
target_sources(hidapi PRIVATE mac/hid.c)
|
||||
elseif(MSVC)
|
||||
target_sources(hidapi PRIVATE windows/hid.c)
|
||||
else()
|
||||
find_package(Libudev)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND LIBUDEV_FOUND)
|
||||
target_sources(hidapi PRIVATE linux/hid.c)
|
||||
target_link_libraries(hidapi PRIVATE udev)
|
||||
else()
|
||||
target_sources(hidapi PRIVATE libusb/hid.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_library(Hidapi::Hidapi ALIAS hidapi)
|
1
Externals/hidapi/libusb/CMakeLists.txt
vendored
1
Externals/hidapi/libusb/CMakeLists.txt
vendored
@ -1 +0,0 @@
|
||||
add_library(hidapi-libusb hid.c)
|
1
Externals/hidapi/linux/CMakeLists.txt
vendored
1
Externals/hidapi/linux/CMakeLists.txt
vendored
@ -1 +0,0 @@
|
||||
add_library(hidapi-hidraw hid.c)
|
1
Externals/hidapi/mac/CMakeLists.txt
vendored
1
Externals/hidapi/mac/CMakeLists.txt
vendored
@ -1 +0,0 @@
|
||||
add_library(hidapi hid.c)
|
1
Externals/hidapi/windows/CMakeLists.txt
vendored
1
Externals/hidapi/windows/CMakeLists.txt
vendored
@ -1 +0,0 @@
|
||||
add_library(hidapi-hid hid.c)
|
Reference in New Issue
Block a user