summaryrefslogtreecommitdiff
path: root/chromium/ui/shell_dialogs/shell_dialogs.gyp
blob: 8bf623659fe943e0ac02dbedc067dd5b982064a4 (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
# Copyright 2013 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.

{
  'variables': {
    'chromium_code': 1,
  },
  'targets': [
    {
      # GN version: //ui/shell_dialogs
      'target_name': 'shell_dialogs',
      'type': '<(component)',
      'dependencies': [
        '../../base/base.gyp:base',
        '../../base/base.gyp:base_i18n',
        '../../skia/skia.gyp:skia',
        '../base/ui_base.gyp:ui_base',
        '../strings/ui_strings.gyp:ui_strings',
      ],
      'defines': [
        'SHELL_DIALOGS_IMPLEMENTATION',
      ],
      'sources': [
        # Note: file list duplicated in GN build.
        'android/shell_dialogs_jni_registrar.cc',
        'android/shell_dialogs_jni_registrar.h',
        'base_shell_dialog.cc',
        'base_shell_dialog.h',
        'base_shell_dialog_win.cc',
        'base_shell_dialog_win.h',
        'select_file_dialog.cc',
        'select_file_dialog.h',
        'select_file_dialog_android.cc',
        'select_file_dialog_android.h',
        'select_file_dialog_factory.cc',
        'select_file_dialog_factory.h',
        'select_file_dialog_mac.h',
        'select_file_dialog_mac.mm',
        'select_file_dialog_win.cc',
        'select_file_dialog_win.h',
        'select_file_policy.cc',
        'select_file_policy.h',
        'selected_file_info.cc',
        'selected_file_info.h',
        'shell_dialog_linux.cc',
        'shell_dialog_linux.h',
      ],
      'conditions': [
        ['use_aura==1',
          {
            'dependencies': [
              '../aura/aura.gyp:aura',
            ],
            'sources!': [
              'select_file_dialog_mac.mm',
            ],
          }
        ],
        ['OS=="android"',
          {
            'dependencies': [
              '../android/ui_android.gyp:ui_android',
              '../android/ui_android.gyp:ui_java',
              '../base/ui_base.gyp:ui_base_jni_headers',
            ],
            'include_dirs': [
              '<(SHARED_INTERMEDIATE_DIR)/ui',
            ],
            'link_settings': {
              'libraries': [
                '-ljnigraphics',
              ],
            },
          }
        ],
      ],
    },  # target_name: shell_dialogs
    {
      # GN version: //ui/shell_dialogs:shell_dialogs_unittests
      'target_name': 'shell_dialogs_unittests',
      'type': 'executable',
      'dependencies': [
        '../../base/base.gyp:base',
        '../../base/base.gyp:test_support_base',
        '../../testing/gtest.gyp:gtest',
        '../base/ui_base.gyp:ui_base',
        'shell_dialogs',
      ],
      'sources': [
        # Note: file list duplicated in GN build.
        'run_all_unittests.cc',
        'select_file_dialog_mac_unittest.mm',
        'select_file_dialog_win_unittest.cc',
      ],
      'conditions' : [
        ['OS=="mac"',
          {
            'mac_bundle': 1,
            'mac_bundle_resources' : [
              '../../chrome/app/nibs/SaveAccessoryView.xib',
              # The unittest expects a locale.pak file to exist in the bundle
              # for English-US. Copy it in from where it was generated by
              # ui_resources.gyp:ui_test_pak.
              '<(PRODUCT_DIR)/ui/en.lproj/locale.pak',
            ],
            'dependencies': [
              # Needed to generate locale.pak.
              '../resources/ui_resources.gyp:ui_test_pak',
            ],
          }
        ],
      ],
    },
  ],
}