mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-28 05:06:42 +00:00
CMake: clean up HIDAPI build
This commit is contained in:
parent
dd31a403db
commit
655ab9b4e2
8 changed files with 34 additions and 38 deletions
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)
|
Loading…
Add table
Add a link
Reference in a new issue