1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 20:22:30 +01:00
rpcs3/3rdparty/hidapi/CMakeLists.txt

21 lines
765 B
CMake
Raw Normal View History

# hidapi
2022-01-02 22:13:55 +01:00
set(BUILD_SHARED_LIBS FALSE CACHE BOOL "Don't build shared libs")
set(HIDAPI_INSTALL_TARGETS FALSE CACHE BOOL "Don't install anything")
if(CMAKE_SYSTEM MATCHES "Linux")
set(HIDAPI_WITH_LIBUSB FALSE CACHE BOOL "Don't build with libusb for linux")
endif()
add_library(3rdparty_hidapi INTERFACE)
2022-01-02 22:13:55 +01:00
add_subdirectory(hidapi EXCLUDE_FROM_ALL)
if(APPLE)
2022-01-03 16:33:33 +01:00
target_link_libraries(3rdparty_hidapi INTERFACE hidapi_darwin "-framework CoreFoundation" "-framework IOKit")
elseif(CMAKE_SYSTEM MATCHES "Linux")
target_link_libraries(3rdparty_hidapi INTERFACE hidapi-hidraw udev)
elseif(WIN32)
target_link_libraries(3rdparty_hidapi INTERFACE hidapi::hidapi hidapi::include Shlwapi.lib)
else()
target_link_libraries(3rdparty_hidapi INTERFACE hidapi-libusb usb)
endif()