summaryrefslogtreecommitdiffstats
path: root/components/storage_monitor.gypi
blob: d5176722e27f9bd19149086d31c88e2c0b4eb66f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
  'targets': [
    {
      # GN version: //components/storage_monitor
      'target_name': 'storage_monitor',
      'type': 'static_library',
      'include_dirs': [
        '..',
      ],
      'dependencies': [
        '../base/base.gyp:base',
      ],
      'sources': [
        'storage_monitor/image_capture_device.h',
        'storage_monitor/image_capture_device.mm',
        'storage_monitor/image_capture_device_manager.h',
        'storage_monitor/image_capture_device_manager.mm',
        'storage_monitor/media_storage_util.cc',
        'storage_monitor/media_storage_util.h',
        'storage_monitor/media_transfer_protocol_device_observer_linux.cc',
        'storage_monitor/media_transfer_protocol_device_observer_linux.h',
        'storage_monitor/mtab_watcher_linux.cc',
        'storage_monitor/mtab_watcher_linux.h',
        'storage_monitor/portable_device_watcher_win.cc',
        'storage_monitor/portable_device_watcher_win.h',
        'storage_monitor/removable_device_constants.cc',
        'storage_monitor/removable_device_constants.h',
        'storage_monitor/removable_storage_observer.h',
        'storage_monitor/storage_info.cc',
        'storage_monitor/storage_info.h',
        'storage_monitor/storage_monitor.cc',
        'storage_monitor/storage_monitor.h',
        'storage_monitor/storage_monitor_chromeos.cc',
        'storage_monitor/storage_monitor_chromeos.h',
        'storage_monitor/storage_monitor_linux.cc',
        'storage_monitor/storage_monitor_linux.h',
        'storage_monitor/storage_monitor_mac.h',
        'storage_monitor/storage_monitor_mac.mm',
        'storage_monitor/storage_monitor_win.cc',
        'storage_monitor/storage_monitor_win.h',
        'storage_monitor/transient_device_ids.cc',
        'storage_monitor/transient_device_ids.h',
        'storage_monitor/udev_util_linux.cc',
        'storage_monitor/udev_util_linux.h',
        'storage_monitor/volume_mount_watcher_win.cc',
        'storage_monitor/volume_mount_watcher_win.h',
      ],
      'conditions': [
        ['OS == "mac"', {
          'link_settings': {
            'libraries': [
              '$(SDKROOT)/System/Library/Frameworks/DiskArbitration.framework',
              '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
              '$(SDKROOT)/System/Library/Frameworks/ImageCaptureCore.framework',
            ],
          },
        }],
        ['OS=="linux"', {
          'dependencies': [
            '../device/media_transfer_protocol/media_transfer_protocol.gyp:device_media_transfer_protocol',
            '../device/media_transfer_protocol/media_transfer_protocol.gyp:mtp_file_entry_proto',
            '../device/media_transfer_protocol/media_transfer_protocol.gyp:mtp_storage_info_proto',
          ],
        }],
        ['use_udev==1', {
          'dependencies': [
            '../device/udev_linux/udev.gyp:udev_linux',
          ],
        }, {  # use_udev==0
          'sources!': [
            'storage_monitor/storage_monitor_linux.cc',
            'storage_monitor/storage_monitor_linux.h',
            'storage_monitor/udev_util_linux.cc',
            'storage_monitor/udev_util_linux.h',
          ],
        }],
        ['chromeos==1', {
          'sources!': [
            'storage_monitor/mtab_watcher_linux.cc',
            'storage_monitor/mtab_watcher_linux.h',
            'storage_monitor/storage_monitor_linux.cc',
            'storage_monitor/storage_monitor_linux.h',
          ],
        }],
      ],
    },
    {
      # GN version: //components/storage_monitor:test_support
      'target_name': 'storage_monitor_test_support',
      'type': 'static_library',
      'include_dirs': [
        '..',
      ],
      'dependencies': [
        '../base/base.gyp:base',
        'storage_monitor',
      ],
      'sources': [
        'storage_monitor/mock_removable_storage_observer.cc',
        'storage_monitor/mock_removable_storage_observer.h',
        'storage_monitor/test_media_transfer_protocol_manager_linux.cc',
        'storage_monitor/test_media_transfer_protocol_manager_linux.h',
        'storage_monitor/test_portable_device_watcher_win.cc',
        'storage_monitor/test_portable_device_watcher_win.h',
        'storage_monitor/test_storage_monitor.cc',
        'storage_monitor/test_storage_monitor.h',
        'storage_monitor/test_storage_monitor_win.cc',
        'storage_monitor/test_storage_monitor_win.h',
        'storage_monitor/test_volume_mount_watcher_win.cc',
        'storage_monitor/test_volume_mount_watcher_win.h',
      ],
      'conditions': [
        ['OS=="linux"', {
          'dependencies': [
            '../device/media_transfer_protocol/media_transfer_protocol.gyp:device_media_transfer_protocol',
            '../device/media_transfer_protocol/media_transfer_protocol.gyp:mtp_file_entry_proto',
            '../device/media_transfer_protocol/media_transfer_protocol.gyp:mtp_storage_info_proto',
          ],
        }],
        ['OS=="win"', {
          'dependencies': [
            '../testing/gtest.gyp:gtest',
          ],
        }],
      ],
    },
  ],
}