OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import("//build/config/features.gni") |
| 6 import("//chrome/version.gni") # TODO layering violation |
| 7 import("//media/cdm/ppapi/cdm_adapter.gni") |
| 8 |
5 widevine_arch = current_cpu | 9 widevine_arch = current_cpu |
6 if (widevine_arch == "x86") { | 10 if (widevine_arch == "x86") { |
7 widevine_arch = "ia32" | 11 widevine_arch = "ia32" |
8 } | 12 } |
9 | 13 |
10 if (is_android) { | 14 if (is_android) { |
11 # Always available on Android regardless of branding. | 15 # Always available on Android regardless of branding. |
12 widevine_cdm_version_h_file = "android/widevine_cdm_version.h" | 16 widevine_cdm_version_h_file = "android/widevine_cdm_version.h" |
13 widevine_cdm_binary_files = [] | 17 widevine_cdm_binary_files = [] |
14 } else if (is_chrome_branded) { | 18 } else if (is_chrome_branded) { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 sources = widevine_cdm_binary_files | 67 sources = widevine_cdm_binary_files |
64 outputs = [ | 68 outputs = [ |
65 "$root_out_dir/{{source_file_part}}", | 69 "$root_out_dir/{{source_file_part}}", |
66 ] | 70 ] |
67 | 71 |
68 # TODO(GYP) | 72 # TODO(GYP) |
69 # 'COPY_PHASE_STRIP': 'NO', | 73 # 'COPY_PHASE_STRIP': 'NO', |
70 } | 74 } |
71 } | 75 } |
72 | 76 |
73 source_set("adapter") { | 77 if (is_chrome_branded && enable_pepper_cdms) { |
74 if (is_chrome_branded) { | 78 adapter_resource_file = "$target_gen_dir/widevinecdmadapter_version.rc" |
| 79 |
| 80 # Produce the .rc file. |
| 81 process_version("adapter_resources") { |
| 82 visibility = [ ":*" ] |
| 83 sources = [ |
| 84 "BRANDING", |
| 85 "widevinecdmadapter.ver", |
| 86 ] |
| 87 output = adapter_resource_file |
| 88 } |
| 89 |
| 90 cdm_adapter("adapter") { |
| 91 sources = [ |
| 92 adapter_resource_file, |
| 93 ] |
75 deps = [ | 94 deps = [ |
| 95 ":adapter_resources", |
| 96 ":binaries", |
76 ":version_h", | 97 ":version_h", |
77 ":binaries", | |
78 "//ppapi/cpp", | 98 "//ppapi/cpp", |
79 | |
80 #'<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', TODO(GYP) | |
81 ] | 99 ] |
82 | 100 |
83 if (is_linux) { | 101 if (is_linux) { |
84 libs = [ rebase_path("$root_out_dir/libwidevinecdm.so", root_build_dir) ] | 102 ldflags = |
| 103 [ rebase_path("$root_out_dir/libwidevinecdm.so", root_build_dir) ] |
| 104 libs = [ "rt" ] |
85 } else if (is_win) { | 105 } else if (is_win) { |
86 libs = | 106 ldflags = |
87 [ rebase_path("$root_out_dir/widevinecdm.dll.lib", root_build_dir) ] | 107 [ rebase_path("$root_out_dir/widevinecdm.dll.lib", root_build_dir) ] |
88 } else if (is_mac) { | 108 } else if (is_mac) { |
89 libs = | 109 ldflags = |
90 [ rebase_path("$root_out_dir/libwidevinecdm.dylib", root_build_dir) ] | 110 [ rebase_path("$root_out_dir/libwidevinecdm.dylib", root_build_dir) ] |
91 } | 111 } |
92 } | 112 } |
| 113 } else { |
| 114 # Placeholder when we're not compiling the adapter. |
| 115 group("adapter") { |
| 116 } |
93 } | 117 } |
94 | 118 |
95 # This target exists for tests to depend on that pulls in a runtime dependency | 119 # This target exists for tests to depend on that pulls in a runtime dependency |
96 # on the license server. | 120 # on the license server. |
97 source_set("widevine_test_license_server") { | 121 source_set("widevine_test_license_server") { |
98 if (is_chrome_branded && is_linux) { | 122 if (is_chrome_branded && is_linux) { |
99 deps = [ | 123 deps = [ |
100 # TODO(GYP) | 124 # TODO(GYP) |
101 # This target should be removed and targets should have datadeps on this t
arget: | 125 # This target should be removed and targets should have datadeps on this t
arget: |
102 #"//third_party/widevine/test/license_server/license_server.gyp:test_licen
se_server" | 126 #"//third_party/widevine/test/license_server/license_server.gyp:test_licen
se_server" |
103 ] | 127 ] |
104 } | 128 } |
105 } | 129 } |
OLD | NEW |