ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / third_party / widevine / cdm / widevine_cdm.gyp
blobeacbdb3a7414ae817f80fa49c35b5e6160107517
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
3 # found in the LICENSE file.
6   'variables': {
7     'widevine_cdm_version_h_file%': 'widevine_cdm_version.h',
8     'widevine_cdm_binary_files%': [],
9     'conditions': [
10       [ 'branding == "Chrome"', {
11         'conditions': [
12           [ 'chromeos == 1', {
13             'widevine_cdm_version_h_file%':
14                 'chromeos/<(target_arch)/widevine_cdm_version.h',
15             'widevine_cdm_binary_files%': [
16               'chromeos/<(target_arch)/libwidevinecdm.so',
17             ],
18           }],
19           [ 'OS == "linux" and chromeos == 0', {
20             'widevine_cdm_version_h_file%':
21                 'linux/<(target_arch)/widevine_cdm_version.h',
22             'widevine_cdm_binary_files%': [
23               'linux/<(target_arch)/libwidevinecdm.so',
24             ],
25           }],
26           [ 'OS == "mac"', {
27             'widevine_cdm_version_h_file%':
28                 'mac/<(target_arch)/widevine_cdm_version.h',
29             'widevine_cdm_binary_files%': [
30               'mac/<(target_arch)/libwidevinecdm.dylib',
31             ],
32           }],
33           [ 'OS == "win"', {
34             'widevine_cdm_version_h_file%':
35                 'win/<(target_arch)/widevine_cdm_version.h',
36             'widevine_cdm_binary_files%': [
37               'win/<(target_arch)/widevinecdm.dll',
38               'win/<(target_arch)/widevinecdm.dll.lib',
39             ],
40           }],
41         ],
42       }],
43       [ 'OS == "android"', {
44         'widevine_cdm_version_h_file%':
45             'android/widevine_cdm_version.h',
46       }],
47     ],
48   },
49   'includes': [
50     '../../../build/util/version.gypi',
51   ],
53   # Always provide a target, so we can put the logic about whether there's
54   # anything to be done in this file (instead of a higher-level .gyp file).
55   'targets': [
56     {
57       # GN version: //third_party/widevine/cdm:adapter_resources
58       'target_name': 'widevinecdmadapter_resources',
59       'type': 'none',
60       'conditions': [
61         ['branding == "Chrome"', {
62           'variables': {
63             'branding_path': '../../../chrome/app/theme/google_chrome/BRANDING',
64           },
65         }, { # else branding!="Chrome"
66           'variables': {
67             'branding_path': '../../../chrome/app/theme/chromium/BRANDING',
68           },
69         }],
70       ],
71       'variables': {
72         'output_dir': '.',
73         'template_input_path': '../../../chrome/app/chrome_version.rc.version',
74         'extra_variable_files_arguments': [ '-f', 'BRANDING' ],
75         'extra_variable_files': [ 'BRANDING' ], # NOTE: matches that above
76       },
77       'sources': [
78         'widevinecdmadapter.ver',
79       ],
80       'includes': [
81         '../../../chrome/version_resource_rules.gypi',
82       ],
83     },
84     {
85       # GN version: //third_party/widevine/cdm:adapter
86       'target_name': 'widevinecdmadapter',
87       'type': 'none',
88       'conditions': [
89         [ 'branding == "Chrome" and enable_pepper_cdms==1', {
90           'dependencies': [
91             '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp',
92             '<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter',
93             'widevine_cdm_version_h',
94             'widevine_cdm_binaries',
95             'widevinecdmadapter_resources',
96           ],
97           'sources': [
98             '<(SHARED_INTERMEDIATE_DIR)/widevinecdmadapter_version.rc',
99           ],
100           'conditions': [
101             [ 'os_posix == 1 and OS != "mac"', {
102               'libraries': [
103                 '-lrt',
104                 # Copied by widevine_cdm_binaries.
105                 '<(PRODUCT_DIR)/libwidevinecdm.so',
106               ],
107             }],
108             [ 'OS == "win"', {
109               'libraries': [
110                 # Copied by widevine_cdm_binaries.
111                 '<(PRODUCT_DIR)/widevinecdm.dll.lib',
112               ],
113             }],
114             [ 'OS == "mac"', {
115               'libraries': [
116                 # Copied by widevine_cdm_binaries.
117                 '<(PRODUCT_DIR)/libwidevinecdm.dylib',
118               ],
119             }],
120           ],
121         }],
122       ],
123     },
124     {
125       # GN version: //third_party/widevine/cdm:version_h
126       'target_name': 'widevine_cdm_version_h',
127       'type': 'none',
128       'copies': [{
129         'destination': '<(SHARED_INTERMEDIATE_DIR)',
130         'files': [ '<(widevine_cdm_version_h_file)' ],
131       }],
132     },
133     {
134       # GN version: //third_party/widevine/cdm:binaries
135       'target_name': 'widevine_cdm_binaries',
136       'type': 'none',
137       'conditions': [
138         [ 'OS=="mac"', {
139           'xcode_settings': {
140             'COPY_PHASE_STRIP': 'NO',
141           }
142         }],
143       ],
144       'copies': [{
145         # TODO(ddorwin): Do we need a sub-directory? We either need a
146         # sub-directory or to rename manifest.json before we can copy it.
147         'destination': '<(PRODUCT_DIR)',
148         'files': [ '<@(widevine_cdm_binary_files)' ],
149       }],
150     },
151     {
152       'target_name': 'widevine_test_license_server',
153       'type': 'none',
154       'conditions': [
155         [ 'branding == "Chrome" and OS == "linux"', {
156           'dependencies': [
157             '<(DEPTH)/third_party/widevine/test/license_server/license_server.gyp:test_license_server',
158           ],
159         }],
160       ],
161     },
162   ],