OLD | NEW |
(Empty) | |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 { |
| 6 'variables': { |
| 7 'chromium_code': 1, |
| 8 'conditions': [ |
| 9 ['(OS=="linux" or OS=="freebsd" or OS=="solaris") and (embedded!=1 or (chr
omecast==1 and target_arch!="arm"))', { |
| 10 'use_alsa%': 1, |
| 11 }, { |
| 12 'use_alsa%': 0, |
| 13 }], |
| 14 ], |
| 15 # Source files that are used in production code for Android, and in tests |
| 16 # for others. |
| 17 'usb_midi_sources': [ |
| 18 'midi_manager_usb.cc', |
| 19 'midi_manager_usb.h', |
| 20 'usb_midi_descriptor_parser.cc', |
| 21 'usb_midi_descriptor_parser.h', |
| 22 'usb_midi_device.h', |
| 23 'usb_midi_input_stream.cc', |
| 24 'usb_midi_input_stream.h', |
| 25 'usb_midi_jack.h', |
| 26 'usb_midi_output_stream.cc', |
| 27 'usb_midi_output_stream.h', |
| 28 ], |
| 29 }, |
| 30 'targets': [ |
| 31 { |
| 32 # GN version: //media/midi |
| 33 'target_name': 'midi', |
| 34 'type': '<(component)', |
| 35 'dependencies': [ |
| 36 '../../base/base.gyp:base', |
| 37 ], |
| 38 'defines': [ |
| 39 'MEDIA_IMPLEMENTATION', |
| 40 ], |
| 41 'include_dirs': [ |
| 42 '../..', |
| 43 ], |
| 44 'sources': [ |
| 45 'midi_manager.cc', |
| 46 'midi_manager.h', |
| 47 'midi_manager_android.cc', |
| 48 'midi_manager_mac.cc', |
| 49 'midi_manager_mac.h', |
| 50 'midi_manager_win.cc', |
| 51 'midi_manager_win.h', |
| 52 'midi_message_queue.cc', |
| 53 'midi_message_queue.h', |
| 54 'midi_message_util.cc', |
| 55 'midi_message_util.h', |
| 56 'midi_port_info.cc', |
| 57 'midi_port_info.h', |
| 58 'midi_scheduler.cc', |
| 59 'midi_scheduler.h', |
| 60 'usb_midi_device_android.cc', |
| 61 'usb_midi_device_android.h', |
| 62 'usb_midi_device_factory_android.cc', |
| 63 'usb_midi_device_factory_android.h', |
| 64 ], |
| 65 'direct_dependent_settings': { |
| 66 'include_dirs': [ |
| 67 '../..', |
| 68 ], |
| 69 }, |
| 70 'conditions': [ |
| 71 ['use_alsa==1 and use_udev==1', { |
| 72 'dependencies': [ |
| 73 '../../crypto/crypto.gyp:crypto', |
| 74 '../../device/udev_linux/udev.gyp:udev_linux', |
| 75 ], |
| 76 'defines': [ |
| 77 'USE_ALSA', |
| 78 'USE_UDEV', |
| 79 ], |
| 80 'sources': [ |
| 81 'midi_manager_alsa.cc', |
| 82 'midi_manager_alsa.h', |
| 83 ], |
| 84 'link_settings': { |
| 85 'libraries': [ |
| 86 '-lasound', |
| 87 ], |
| 88 }, |
| 89 }], |
| 90 ['OS=="android"', { |
| 91 'dependencies': [ |
| 92 '../../base/base.gyp:base_i18n', |
| 93 'midi_jni_headers', |
| 94 'midi_java', |
| 95 ], |
| 96 'sources': [ |
| 97 '<@(usb_midi_sources)', |
| 98 'midi_jni_registrar.cc', |
| 99 'midi_jni_registrar.h', |
| 100 ], |
| 101 }], |
| 102 ['OS=="mac"', { |
| 103 'link_settings': { |
| 104 'libraries': [ |
| 105 '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework', |
| 106 '$(SDKROOT)/System/Library/Frameworks/CoreMIDI.framework', |
| 107 ], |
| 108 }, |
| 109 }], |
| 110 ['OS=="win"', { |
| 111 'dependencies': [ |
| 112 '../../device/usb/usb.gyp:device_usb', |
| 113 ], |
| 114 }], |
| 115 ], # conditions |
| 116 }, |
| 117 { |
| 118 # GN version: //media/midi:midi_unittests |
| 119 'target_name': 'midi_unittests', |
| 120 'type': '<(gtest_target_type)', |
| 121 'dependencies': [ |
| 122 'midi', |
| 123 '../../base/base.gyp:base', |
| 124 '../../base/base.gyp:run_all_unittests', |
| 125 '../../testing/gtest.gyp:gtest', |
| 126 ], |
| 127 'defines': [ |
| 128 'MEDIA_IMPLEMENTATION', |
| 129 ], |
| 130 'include_dirs': [ |
| 131 '../..', |
| 132 ], |
| 133 'sources': [ |
| 134 'midi_manager_unittest.cc', |
| 135 'midi_manager_usb_unittest.cc', |
| 136 'midi_message_queue_unittest.cc', |
| 137 'midi_message_util_unittest.cc', |
| 138 'usb_midi_descriptor_parser_unittest.cc', |
| 139 'usb_midi_input_stream_unittest.cc', |
| 140 'usb_midi_output_stream_unittest.cc', |
| 141 ], |
| 142 'conditions': [ |
| 143 ['use_alsa==1 and use_udev==1', { |
| 144 'defines': [ |
| 145 'USE_ALSA', |
| 146 'USE_UDEV', |
| 147 ], |
| 148 'sources': [ |
| 149 'midi_manager_alsa_unittest.cc', |
| 150 ], |
| 151 }], |
| 152 ['use_x11==1', { |
| 153 'dependencies': [ |
| 154 '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', |
| 155 ], |
| 156 }], |
| 157 ['OS=="android"', { |
| 158 'dependencies': [ |
| 159 '../../testing/android/native_test.gyp:native_test_native_code', |
| 160 ], |
| 161 }, { |
| 162 'sources': [ |
| 163 '<@(usb_midi_sources)', |
| 164 ], |
| 165 }], |
| 166 ['OS=="mac"', { |
| 167 'sources': [ |
| 168 'midi_manager_mac_unittest.cc', |
| 169 ], |
| 170 }], |
| 171 ], |
| 172 }, |
| 173 ], |
| 174 'conditions': [ |
| 175 ['OS=="android"', { |
| 176 'targets': [ |
| 177 { |
| 178 # TODO(GN) |
| 179 'target_name': 'midi_unittests_apk', |
| 180 'type': 'none', |
| 181 'dependencies': [ |
| 182 'midi_java', |
| 183 'midi_unittests', |
| 184 ], |
| 185 'variables': { |
| 186 'test_suite_name': 'midi_unittests', |
| 187 }, |
| 188 'includes': ['../../build/apk_test.gypi'], |
| 189 }, |
| 190 { |
| 191 # GN: //media/midi:midi_java |
| 192 'target_name': 'midi_java', |
| 193 'type': 'none', |
| 194 'dependencies': [ |
| 195 '../../base/base.gyp:base', |
| 196 ], |
| 197 'variables': { |
| 198 'java_in_dir': 'java', |
| 199 }, |
| 200 'includes': ['../../build/java.gypi' ], |
| 201 }, |
| 202 { |
| 203 # GN: //media/midi:midi_jni_headers |
| 204 'target_name': 'midi_jni_headers', |
| 205 'type': 'none', |
| 206 'sources': [ |
| 207 'java/src/org/chromium/media/midi/UsbMidiDeviceAndroid.java', |
| 208 'java/src/org/chromium/media/midi/UsbMidiDeviceFactoryAndroid.java', |
| 209 ], |
| 210 'variables': { |
| 211 'jni_gen_package': 'media/midi', |
| 212 }, |
| 213 'includes': ['../../build/jni_generator.gypi'], |
| 214 }, |
| 215 ], |
| 216 }], |
| 217 ['test_isolation_mode != "noop"', { |
| 218 'targets': [ |
| 219 { |
| 220 'target_name': 'midi_unittests_run', |
| 221 'type': 'none', |
| 222 'dependencies': [ |
| 223 'midi_unittests', |
| 224 ], |
| 225 'includes': [ |
| 226 '../../build/isolate.gypi', |
| 227 ], |
| 228 'sources': [ |
| 229 'midi_unittests.isolate', |
| 230 ], |
| 231 }, |
| 232 ], |
| 233 }], |
| 234 ], |
| 235 } |
OLD | NEW |