1# - try to find HIDAPI library
2# from http://www.signal11.us/oss/hidapi/
3#
4# Cache Variables: (probably not for direct use in your scripts)
5#  HIDAPI_INCLUDE_DIR
6#  HIDAPI_LIBRARY
7#
8# Non-cache variables you might use in your CMakeLists.txt:
9#  HIDAPI_FOUND
10#  HIDAPI_INCLUDE_DIRS
11#  HIDAPI_LIBRARIES
12#
13# Requires these CMake modules:
14#  FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
15#
16# Original Author:
17# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
18# http://academic.cleardefinition.com
19# Iowa State University HCI Graduate Program/VRAC
20#
21# Copyright Iowa State University 2009-2010.
22# Distributed under the Boost Software License, Version 1.0.
23# (See accompanying file LICENSE_1_0.txt or copy at
24# http://www.boost.org/LICENSE_1_0.txt)
25
26find_library(HIDAPI_LIBRARY
27	NAMES hidapi hidapi-libusb)
28
29find_path(HIDAPI_INCLUDE_DIR
30	NAMES hidapi.h
31	PATH_SUFFIXES
32	hidapi)
33
34include(FindPackageHandleStandardArgs)
35find_package_handle_standard_args(HIDAPI
36	DEFAULT_MSG
37	HIDAPI_LIBRARY
38	HIDAPI_INCLUDE_DIR)
39
40if(HIDAPI_FOUND)
41	set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARY}")
42
43	set(HIDAPI_INCLUDE_DIRS "${HIDAPI_INCLUDE_DIR}")
44endif()
45
46mark_as_advanced(HIDAPI_INCLUDE_DIR HIDAPI_LIBRARY)
47