Skip to content

Commit 3d735a8

Browse files
nbourdauzarvox
authored andcommitted
Remove libusb.h include from libfreenect.h
typedef freenect_usb_context as void, as it is already for win32. That way, we drop the need to have a properly installed developpement files of libusb when we don't use it directly. This fix also partly the problem of discrepancy between the include paths of libusb on freebsd and libusb-1.0 Signed-off-by: Nicolas Bourdaud <[email protected]>
1 parent 416b250 commit 3d735a8

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

include/libfreenect.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,7 @@ struct _freenect_device;
156156
typedef struct _freenect_device freenect_device; /**< Holds device information. */
157157

158158
// usb backend specific section
159-
#ifdef _WIN32
160-
/* frees Windows users of the burden of specifying the path to <libusb-1.0/libusb.h> */
161-
typedef void freenect_usb_context;
162-
#else
163-
#include <libusb-1.0/libusb.h>
164-
typedef libusb_context freenect_usb_context; /**< Holds libusb-1.0 specific information */
165-
#endif
159+
typedef void freenect_usb_context; /**< Holds libusb-1.0 context */
166160
//
167161

168162
/// If Win32, export all functions for DLL usage

src/libfreenect.pc.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ includedir=${prefix}/@PROJECT_INCLUDE_INSTALL_DIR@
55

66
Name: @CMAKE_PROJECT_NAME@
77
Description: Interface to the Microsoft Kinect sensor device.
8-
Requires: libusb-1.0
8+
Requires.private: libusb-1.0
99
Version: @PROJECT_APIVER@
1010
Libs: -L${libdir} -lfreenect
1111
Cflags: -I${includedir}

0 commit comments

Comments
 (0)