summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorspang@chromium.org <spang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-18 22:14:13 +0000
committerspang@chromium.org <spang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-18 22:15:59 +0000
commit1d655fe94f4bf017154d9fcc56e375dce491220a (patch)
tree5da169a3c6f3bd2b073d10fe5091757b0d00e3ba /third_party
parent1fdcfb56d3e76afa29cfc4ff795ba9c1353b0f54 (diff)
downloadchromium_src-1d655fe94f4bf017154d9fcc56e375dce491220a.zip
chromium_src-1d655fe94f4bf017154d9fcc56e375dce491220a.tar.gz
chromium_src-1d655fe94f4bf017154d9fcc56e375dce491220a.tar.bz2
Make udev target disappear on linux when use_udev==0
So we don't break builds that don't use it by running pkg-config, and so we don't accidently link against it when it is disabled. The embedded=1 build has OS=="linux" use_udev==0 for small devices such as the chromecast. BUG=403162 Review URL: https://codereview.chromium.org/467983002 Cr-Commit-Position: refs/heads/master@{#290377} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290377 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/libusb/libusb.gyp27
1 files changed, 24 insertions, 3 deletions
diff --git a/third_party/libusb/libusb.gyp b/third_party/libusb/libusb.gyp
index 9ea8af5..02d3196 100644
--- a/third_party/libusb/libusb.gyp
+++ b/third_party/libusb/libusb.gyp
@@ -53,17 +53,38 @@
}],
[ 'OS == "linux" or OS == "android"', {
'sources': [
- 'src/libusb/os/linux_udev.c',
'src/libusb/os/linux_usbfs.c',
'src/libusb/os/linux_usbfs.h',
],
'defines': [
- 'HAVE_LIBUDEV=1',
'OS_LINUX=1',
- 'USE_UDEV=1',
'_GNU_SOURCE=1',
],
}],
+ [ 'use_udev == 1 or OS == "android"', {
+ 'sources': [
+ 'src/libusb/os/linux_udev.c',
+ ],
+ 'defines': [
+ 'HAVE_LIBUDEV=1',
+ 'USE_UDEV=1',
+ ],
+ }],
+ [ 'OS == "linux" and use_udev == 0', {
+ 'sources': [
+ 'src/libusb/os/linux_netlink.c',
+ ],
+ 'defines': [
+ 'HAVE_LINUX_NETLINK_H',
+ ],
+ 'conditions': [
+ ['clang==1', {
+ 'cflags': [
+ '-Wno-pointer-sign',
+ ]
+ }]
+ ],
+ }],
[ 'OS == "mac"', {
'sources': [
'src/libusb/os/darwin_usb.c',