summaryrefslogtreecommitdiffstats
path: root/third_party/libusb
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-26 00:20:29 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-26 00:20:29 +0000
commit944cab8c2053844039d0e44ddcdcc489ba2b1d6c (patch)
tree7a6ce5e91643a7054a6d0509951d8fa9c9007b06 /third_party/libusb
parent74f50486fe54b57cb9ac2813aa97ff9e5dda4c94 (diff)
downloadchromium_src-944cab8c2053844039d0e44ddcdcc489ba2b1d6c.zip
chromium_src-944cab8c2053844039d0e44ddcdcc489ba2b1d6c.tar.gz
chromium_src-944cab8c2053844039d0e44ddcdcc489ba2b1d6c.tar.bz2
Extract use_system_foo logic out of gyp files, patch 2
This removes use_system_foo logic completely from: * jsoncpp.gyp * libevent.gyp * libpng.gyp * libusb.gyp * libwebp.gyp * opus.gyp * re2.gyp * zlib.gyp R=rsleevi TBR=darin BUG=226860 Review URL: https://codereview.chromium.org/14203006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196551 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libusb')
-rw-r--r--third_party/libusb/libusb.gyp137
1 files changed, 53 insertions, 84 deletions
diff --git a/third_party/libusb/libusb.gyp b/third_party/libusb/libusb.gyp
index 1e29d25..196054e 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',
],
}],
],