dolphin/Externals/hidapi/CMakeLists.txt

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
624 B
CMake
Raw Normal View History

2017-04-25 03:06:39 +00:00
project(hidapi)
add_library(hidapi STATIC hidapi/hidapi.h)
dolphin_disable_warnings_msvc(hidapi)
2017-04-25 03:06:39 +00:00
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)
target_link_libraries(hidapi PRIVATE ${LIBUSB_LIBRARIES})
2017-04-25 03:06:39 +00:00
endif()
endif()
add_library(Hidapi::Hidapi ALIAS hidapi)