| Index: third_party/libusb/libusb.gyp
|
| diff --git a/third_party/libusb/libusb.gyp b/third_party/libusb/libusb.gyp
|
| index 1e29d251a84f9139a2c01375ad9e45efc3225cdf..196054ecf4415db6c74751b46adc0af0e232c323 100644
|
| --- a/third_party/libusb/libusb.gyp
|
| +++ b/third_party/libusb/libusb.gyp
|
| @@ -3,99 +3,68 @@
|
| # found in the LICENSE file.
|
|
|
| {
|
| - 'variables': {
|
| - 'use_system_libusb%': 0,
|
| - },
|
| 'targets': [
|
| {
|
| 'target_name': 'libusb',
|
| + 'type': 'static_library',
|
| + 'sources': [
|
| + 'src/libusb/core.c',
|
| + 'src/libusb/descriptor.c',
|
| + 'src/libusb/io.c',
|
| + 'src/libusb/sync.c',
|
| + ],
|
| + 'include_dirs': [
|
| + 'src',
|
| + 'src/libusb',
|
| + 'src/libusb/os',
|
| + ],
|
| + 'direct_dependent_settings': {
|
| + 'include_dirs': [
|
| + 'src/libusb',
|
| + ],
|
| + },
|
| 'conditions': [
|
| - ['OS == "linux" and use_system_libusb==1', {
|
| - 'type': 'none',
|
| - 'variables': {
|
| - 'headers_root_path': 'src/libusb',
|
| - 'header_filenames': [
|
| - 'libusb.h',
|
| - ],
|
| - },
|
| - 'includes': [
|
| - '../../build/shim_headers.gypi',
|
| + [ 'OS == "linux" or OS == "android"', {
|
| + 'sources': [
|
| + 'src/libusb/os/linux_usbfs.c',
|
| + 'src/libusb/os/threads_posix.c',
|
| ],
|
| - 'direct_dependent_settings': {
|
| - 'cflags': [
|
| - '<!@(pkg-config --cflags libusb-1.0)',
|
| - ],
|
| - 'link_settings': {
|
| - 'ldflags': [
|
| - '<!@(pkg-config --libs-only-L --libs-only-other libusb-1.0)',
|
| - ],
|
| - 'libraries': [
|
| - '<!@(pkg-config --libs-only-l libusb-1.0)',
|
| - ],
|
| - },
|
| - },
|
| - }, {
|
| - 'type': 'static_library',
|
| + 'defines': [
|
| + 'DEFAULT_VISIBILITY=',
|
| + 'HAVE_POLL_H=1',
|
| + 'HAVE_SYS_TIME_H=1',
|
| + 'OS_LINUX=1',
|
| + 'POLL_NFDS_TYPE=nfds_t',
|
| + 'THREADS_POSIX=1',
|
| + '_GNU_SOURCE=1',
|
| + ],
|
| + }],
|
| + ['OS == "win"', {
|
| 'sources': [
|
| - 'src/libusb/core.c',
|
| - 'src/libusb/descriptor.c',
|
| - 'src/libusb/io.c',
|
| - 'src/libusb/sync.c',
|
| + 'src/libusb/os/poll_windows.c',
|
| + 'src/libusb/os/threads_windows.c',
|
| + 'src/libusb/os/windows_usb.c',
|
| ],
|
| - 'include_dirs': [
|
| + 'include_dirs!': [
|
| 'src',
|
| - 'src/libusb',
|
| - 'src/libusb/os',
|
| ],
|
| - 'direct_dependent_settings': {
|
| - 'include_dirs': [
|
| - 'src/libusb',
|
| - ],
|
| - },
|
| - 'conditions': [
|
| - [ 'OS == "linux" or OS == "android"', {
|
| - 'sources': [
|
| - 'src/libusb/os/linux_usbfs.c',
|
| - 'src/libusb/os/threads_posix.c',
|
| - ],
|
| - 'defines': [
|
| - 'DEFAULT_VISIBILITY=',
|
| - 'HAVE_POLL_H=1',
|
| - 'HAVE_SYS_TIME_H=1',
|
| - 'OS_LINUX=1',
|
| - 'POLL_NFDS_TYPE=nfds_t',
|
| - 'THREADS_POSIX=1',
|
| - '_GNU_SOURCE=1',
|
| - ],
|
| - }],
|
| - ['OS == "win"', {
|
| - 'sources': [
|
| - 'src/libusb/os/poll_windows.c',
|
| - 'src/libusb/os/threads_windows.c',
|
| - 'src/libusb/os/windows_usb.c',
|
| - ],
|
| - 'include_dirs!': [
|
| - 'src',
|
| - ],
|
| - 'include_dirs': [
|
| - 'src/msvc',
|
| - ],
|
| - }],
|
| - ['OS == "mac"', {
|
| - 'sources': [
|
| - 'src/libusb/os/darwin_usb.c',
|
| - 'src/libusb/os/threads_posix.c',
|
| - ],
|
| - 'defines': [
|
| - 'DEFAULT_VISIBILITY=',
|
| - 'HAVE_POLL_H=1',
|
| - 'HAVE_SYS_TIME_H=1',
|
| - 'OS_DARWIN=1',
|
| - 'POLL_NFDS_TYPE=nfds_t',
|
| - 'THREADS_POSIX=1',
|
| - '_GNU_SOURCE=1',
|
| - ],
|
| - }],
|
| + 'include_dirs': [
|
| + 'src/msvc',
|
| + ],
|
| + }],
|
| + ['OS == "mac"', {
|
| + 'sources': [
|
| + 'src/libusb/os/darwin_usb.c',
|
| + 'src/libusb/os/threads_posix.c',
|
| + ],
|
| + 'defines': [
|
| + 'DEFAULT_VISIBILITY=',
|
| + 'HAVE_POLL_H=1',
|
| + 'HAVE_SYS_TIME_H=1',
|
| + 'OS_DARWIN=1',
|
| + 'POLL_NFDS_TYPE=nfds_t',
|
| + 'THREADS_POSIX=1',
|
| + '_GNU_SOURCE=1',
|
| ],
|
| }],
|
| ],
|
|
|