Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: third_party/libusb/libusb.gyp

Issue 14203006: Extract use_system_foo logic out of gyp files, patch 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 { 5 {
6 'variables': {
7 'use_system_libusb%': 0,
8 },
9 'targets': [ 6 'targets': [
10 { 7 {
11 'target_name': 'libusb', 8 'target_name': 'libusb',
9 'type': 'static_library',
10 'sources': [
11 'src/libusb/core.c',
12 'src/libusb/descriptor.c',
13 'src/libusb/io.c',
14 'src/libusb/sync.c',
15 ],
16 'include_dirs': [
17 'src',
18 'src/libusb',
19 'src/libusb/os',
20 ],
21 'direct_dependent_settings': {
22 'include_dirs': [
23 'src/libusb',
24 ],
25 },
12 'conditions': [ 26 'conditions': [
13 ['OS == "linux" and use_system_libusb==1', { 27 [ 'OS == "linux" or OS == "android"', {
14 'type': 'none', 28 'sources': [
15 'variables': { 29 'src/libusb/os/linux_usbfs.c',
16 'headers_root_path': 'src/libusb', 30 'src/libusb/os/threads_posix.c',
17 'header_filenames': [
18 'libusb.h',
19 ],
20 },
21 'includes': [
22 '../../build/shim_headers.gypi',
23 ], 31 ],
24 'direct_dependent_settings': { 32 'defines': [
25 'cflags': [ 33 'DEFAULT_VISIBILITY=',
26 '<!@(pkg-config --cflags libusb-1.0)', 34 'HAVE_POLL_H=1',
27 ], 35 'HAVE_SYS_TIME_H=1',
28 'link_settings': { 36 'OS_LINUX=1',
29 'ldflags': [ 37 'POLL_NFDS_TYPE=nfds_t',
30 '<!@(pkg-config --libs-only-L --libs-only-other libusb-1.0)', 38 'THREADS_POSIX=1',
31 ], 39 '_GNU_SOURCE=1',
32 'libraries': [ 40 ],
33 '<!@(pkg-config --libs-only-l libusb-1.0)', 41 }],
34 ], 42 ['OS == "win"', {
35 },
36 },
37 }, {
38 'type': 'static_library',
39 'sources': [ 43 'sources': [
40 'src/libusb/core.c', 44 'src/libusb/os/poll_windows.c',
41 'src/libusb/descriptor.c', 45 'src/libusb/os/threads_windows.c',
42 'src/libusb/io.c', 46 'src/libusb/os/windows_usb.c',
43 'src/libusb/sync.c', 47 ],
48 'include_dirs!': [
49 'src',
44 ], 50 ],
45 'include_dirs': [ 51 'include_dirs': [
46 'src', 52 'src/msvc',
47 'src/libusb',
48 'src/libusb/os',
49 ], 53 ],
50 'direct_dependent_settings': { 54 }],
51 'include_dirs': [ 55 ['OS == "mac"', {
52 'src/libusb', 56 'sources': [
53 ], 57 'src/libusb/os/darwin_usb.c',
54 }, 58 'src/libusb/os/threads_posix.c',
55 'conditions': [ 59 ],
56 [ 'OS == "linux" or OS == "android"', { 60 'defines': [
57 'sources': [ 61 'DEFAULT_VISIBILITY=',
58 'src/libusb/os/linux_usbfs.c', 62 'HAVE_POLL_H=1',
59 'src/libusb/os/threads_posix.c', 63 'HAVE_SYS_TIME_H=1',
60 ], 64 'OS_DARWIN=1',
61 'defines': [ 65 'POLL_NFDS_TYPE=nfds_t',
62 'DEFAULT_VISIBILITY=', 66 'THREADS_POSIX=1',
63 'HAVE_POLL_H=1', 67 '_GNU_SOURCE=1',
64 'HAVE_SYS_TIME_H=1',
65 'OS_LINUX=1',
66 'POLL_NFDS_TYPE=nfds_t',
67 'THREADS_POSIX=1',
68 '_GNU_SOURCE=1',
69 ],
70 }],
71 ['OS == "win"', {
72 'sources': [
73 'src/libusb/os/poll_windows.c',
74 'src/libusb/os/threads_windows.c',
75 'src/libusb/os/windows_usb.c',
76 ],
77 'include_dirs!': [
78 'src',
79 ],
80 'include_dirs': [
81 'src/msvc',
82 ],
83 }],
84 ['OS == "mac"', {
85 'sources': [
86 'src/libusb/os/darwin_usb.c',
87 'src/libusb/os/threads_posix.c',
88 ],
89 'defines': [
90 'DEFAULT_VISIBILITY=',
91 'HAVE_POLL_H=1',
92 'HAVE_SYS_TIME_H=1',
93 'OS_DARWIN=1',
94 'POLL_NFDS_TYPE=nfds_t',
95 'THREADS_POSIX=1',
96 '_GNU_SOURCE=1',
97 ],
98 }],
99 ], 68 ],
100 }], 69 }],
101 ], 70 ],
102 }, 71 },
103 ], 72 ],
104 } 73 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698