# Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary # source code may only be used and distributed under the Widevine Master License # Agreement. # # Refer to the distribution package's integration guide # (Widevine_CE_CDM_IntegrationGuide_x.x.x.pdf) for information about # setting up your system, performing the build, and using/testing # the build targets. { 'includes': [ 'platform_properties.gypi', 'core.gypi', 'util.gypi', ], # Get list of core source files. 'conditions': [ ['protobuf_config=="source"', { # Include protobuf targets used by protobuf_config=='source' 'includes': ['../third_party/protobuf.gypi'], }], ], # conditions 'targets': [ { 'target_name': 'license_protocol', 'type': 'static_library', 'standalone_static_library': 1, 'includes': ['../third_party/protoc.gypi'], 'sources': [ '../core/src/license_protocol.proto', ], 'variables': { 'proto_in_dir': '../core/src', }, }, { 'target_name': 'device_files', 'type': 'static_library', 'standalone_static_library': 1, 'includes': ['../third_party/protoc.gypi'], 'sources': ['../core/src/device_files.proto',], 'variables': { 'proto_in_dir': '../core/src', }, }, { 'target_name': 'metrics_proto', 'type': 'static_library', 'standalone_static_library': 1, 'includes': ['../third_party/protoc.gypi'], 'sources': ['../metrics/src/wv_metrics.proto',], 'variables': { 'proto_in_dir': '../metrics/src', }, }, { 'target_name': 'widevine_utils', 'type': 'static_library', 'include_dirs': [ '../util/include', ], 'sources': [ '<@(wvutil_sources)'], }, { 'target_name': 'widevine_cdm_core', 'type': 'static_library', 'standalone_static_library': 1, 'dependencies': [ 'device_files', 'license_protocol', 'metrics_proto', 'widevine_utils', ], 'include_dirs': [ '../core/include', '../metrics/include', '../oemcrypto/include', '../oemcrypto/odk/include', '../third_party/jsmn', '../util/include', ], 'defines': [ 'CORE_UTIL_IMPLEMENTATION', ], 'direct_dependent_settings': { 'include_dirs': [ '../core/include', '../metrics/include', '../oemcrypto/include', '../util/include', ], }, 'sources': [ '<@(wvcdm_sources)', '../third_party/jsmn/jsmn.h', '../third_party/jsmn/jsmn.c', ], 'includes': [ '../util/libcrypto_dependency.gypi' ], 'conditions': [ ['privacy_crypto_impl=="boringssl" or privacy_crypto_impl=="openssl"', { 'sources': [ '../core/src/privacy_crypto_boringssl.cpp', ], }, { # else 'sources': [ '../core/src/privacy_crypto_<(privacy_crypto_impl).cpp', ], }], # end else ['oemcrypto_adapter_type=="dynamic"', { 'sources': [ '../core/src/oemcrypto_adapter_dynamic.cpp', ], }], ['oemcrypto_adapter_type=="static"', { 'sources': [ '../core/src/oemcrypto_adapter_static.cpp', ], }], # TODO(b/139814713): For testing and internal use only. ['oemcrypto_adapter_type=="static_v15"', { 'sources': [ '../core/src/oemcrypto_adapter_static.cpp', '../core/src/oemcrypto_adapter_static_v16.cpp', ], }], ], }, # widevine_cdm_core target { # This is the widevine_ce_cdm built as a static library. This name does # not mean that it uses oemcrypto's static adapter. Control over which # adapter is used comes from the settings file for the platform. 'target_name': 'widevine_ce_cdm_static', 'type': 'static_library', 'standalone_static_library': 1, 'hard_dependency': 1, 'dependencies': [ 'widevine_cdm_core', 'device_files', 'license_protocol', 'metrics_proto', ], # Without this, library deps do not propagate from the protocol targets # up to the shared lib or executable above. 'export_dependent_settings': [ 'device_files', 'license_protocol', 'metrics_proto', ], 'defines': [ 'CDM_IMPLEMENTATION', 'CORE_UTIL_IMPLEMENTATION', ], 'include_dirs': [ 'include', ], 'direct_dependent_settings': { 'include_dirs': [ 'include', ], }, 'sources': [ 'include/cdm.h', 'include/cdm_version.h', 'include/properties_ce.h', 'src/cdm.cpp', 'src/log.cpp', 'src/properties_ce.cpp', ], }, # widevine_cdm_static target { 'target_name': 'widevine_ce_cdm_shared', 'type': 'shared_library', 'dependencies': [ 'widevine_ce_cdm_static', ], 'direct_dependent_settings': { 'include_dirs': [ 'include', ], }, }, { 'target_name': 'dummy', 'type': 'none', }, ], }