OLD | NEW |
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': { | 6 'variables': { |
7 'use_system_libusb%': 0, | 7 'use_system_libusb%': 0, |
8 }, | 8 }, |
9 'targets': [ | 9 'targets': [ |
10 { | 10 { |
11 'target_name': 'libusb', | 11 'target_name': 'libusb', |
12 'conditions': [ | 12 'conditions': [ |
13 ['OS == "linux" and use_system_libusb', { | 13 ['OS == "linux" and use_system_libusb==1', { |
14 'type': 'none', | 14 'type': 'none', |
| 15 'variables': { |
| 16 'headers_root_path': 'src/libusb', |
| 17 'header_filenames': [ |
| 18 'libusb.h', |
| 19 ], |
| 20 }, |
| 21 'includes': [ |
| 22 '../../build/shim_headers.gypi', |
| 23 ], |
15 'direct_dependent_settings': { | 24 'direct_dependent_settings': { |
16 'defines': [ | |
17 'USE_SYSTEM_LIBUSB', | |
18 ], | |
19 'cflags': [ | 25 'cflags': [ |
20 '<!@(pkg-config --cflags libusb-1.0)', | 26 '<!@(pkg-config --cflags libusb-1.0)', |
21 ], | 27 ], |
22 'link_settings': { | 28 'link_settings': { |
23 'ldflags': [ | 29 'ldflags': [ |
24 '<!@(pkg-config --libs-only-L --libs-only-other libusb-1.0)', | 30 '<!@(pkg-config --libs-only-L --libs-only-other libusb-1.0)', |
25 ], | 31 ], |
26 'libraries': [ | 32 'libraries': [ |
27 '<!@(pkg-config --libs-only-l libusb-1.0)', | 33 '<!@(pkg-config --libs-only-l libusb-1.0)', |
28 ], | 34 ], |
29 }, | 35 }, |
30 }, | 36 }, |
31 }, { | 37 }, { |
32 'type': '<(library)', | 38 'type': '<(library)', |
33 'sources': [ | 39 'sources': [ |
34 'src/libusb/core.c', | 40 'src/libusb/core.c', |
35 'src/libusb/descriptor.c', | 41 'src/libusb/descriptor.c', |
36 'src/libusb/io.c', | 42 'src/libusb/io.c', |
37 'src/libusb/sync.c', | 43 'src/libusb/sync.c', |
38 ], | 44 ], |
39 'include_dirs': [ | 45 'include_dirs': [ |
40 'src', | 46 'src', |
41 'src/libusb', | 47 'src/libusb', |
42 'src/libusb/os', | 48 'src/libusb/os', |
43 ], | 49 ], |
44 'direct_dependent_settings': { | 50 'direct_dependent_settings': { |
45 'include_dirs': [ | 51 'include_dirs': [ |
46 '.', | 52 'src/libusb', |
47 ], | 53 ], |
48 }, | 54 }, |
49 'conditions': [ | 55 'conditions': [ |
50 [ 'OS == "linux" or OS == "android"', { | 56 [ 'OS == "linux" or OS == "android"', { |
51 'sources': [ | 57 'sources': [ |
52 'src/libusb/os/linux_usbfs.c', | 58 'src/libusb/os/linux_usbfs.c', |
53 'src/libusb/os/threads_posix.c', | 59 'src/libusb/os/threads_posix.c', |
54 ], | 60 ], |
55 'defines': [ | 61 'defines': [ |
56 'DEFAULT_VISIBILITY=', | 62 'DEFAULT_VISIBILITY=', |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 'THREADS_POSIX=1', | 95 'THREADS_POSIX=1', |
90 '_GNU_SOURCE=1', | 96 '_GNU_SOURCE=1', |
91 ], | 97 ], |
92 }], | 98 }], |
93 ], | 99 ], |
94 }], | 100 }], |
95 ], | 101 ], |
96 }, | 102 }, |
97 ], | 103 ], |
98 } | 104 } |
OLD | NEW |