summaryrefslogtreecommitdiff
path: root/chromium/media/cdm/library_cdm/cdm_paths.gni
blob: 833d9c8b5e6ca37663229b8492ab0c163622e332 (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
# Copyright 2016 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.

# This file defines output paths for the CDM adapters and CDMs.

# Naming and folder structure below are following the recommendation for Chrome
# components. Component-updated CDMs must follow the same recommendation.

# OS name for components is close to "target_os" but has some differences.
# Explicitly define what we use to avoid confusion.
if (is_chromeos) {
  component_os = "cros"
} else if (is_linux) {
  component_os = "linux"
} else if (is_win) {
  component_os = "win"
} else if (is_mac) {
  component_os = "mac"
} else {
  component_os = "unsupported_platform"
}

component_arch = "$current_cpu"

# Enable platform specific paths. This is required when the CDMs are Chrome
# components, but is optional for other platforms.
# Note:
# - |cdm_platform_specific_path| is exported as a BUILDFLAG to cdm_paths.cc.
# - When updating the condition here, also update the condition on the define
#   of CDM_USE_PLATFORM_SPECIFIC_PATH in cdm_paths_unittest.cc.
if (is_win || is_mac || is_linux) {
  cdm_platform_specific_path =
      "_platform_specific/$component_os" + "_" + "$component_arch"

  # Path of Clear Key and Widevine CDMs relative to the output dir.
  clearkey_cdm_path = "ClearKeyCdm/$cdm_platform_specific_path"
  widevine_cdm_path = "WidevineCdm/$cdm_platform_specific_path"
} else if (is_fuchsia) {
  cdm_platform_specific_path = ""
  clearkey_cdm_path = "lib"
  widevine_cdm_path = "lib"
} else {
  cdm_platform_specific_path = ""
  clearkey_cdm_path = "."
  widevine_cdm_path = "."
}