# 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. # # Builds under the CDM ./build.py (target platform) build system # Refer to the distribution package's README for details. { 'variables': { # Label as 'static' or 'dynamic' to use the respective OEMCrypto adapter. 'oemcrypto_adapter%': 'static', # Choose type of OEMCrypto library to compile in (ref, level3, vendor). # Production Level 1 systems should use vendor. 'oemcrypto_lib%': 'ref', # Override this for the location to the BoringSSL gyp file. 'boringssl_dependency%': '../third_party/boringssl/boringssl.gyp:ssl', # Directory where OEMCrypto header, test, and reference files lives. 'oemcrypto_dir%': '../oemcrypto', # Directory where widevine utilities live. 'util_dir%': '../util', 'metrics_target%': 'cdm.gyp:metrics_proto', 'device_files_target%': 'cdm.gyp:device_files', }, 'targets': [ { 'target_name': 'widevine_ce_cdm_unittest', 'type': 'executable', 'sources': [ # The test runner and the testing device certificate. 'test/cdm_test_main.cpp', 'test/device_cert.cpp', 'test/device_cert.h', # The test host, which is required for all test suites on CE. 'test/test_host.cpp', 'test/test_host.h', ], 'includes': [ '../oemcrypto/test/oemcrypto_unittests.gypi', 'core_unittests.gypi', 'cdm_unittests.gypi', ], 'dependencies': [ 'cdm.gyp:widevine_ce_cdm_static', '../third_party/gmock.gyp:gmock', '../third_party/gmock.gyp:gtest', ], 'defines': [ # The methods in util/ are marked as dllimport but in this case are # being loaded in the static library. So define this so Windows # doesn't look in a DLL for the implementations. 'CORE_UTIL_IMPLEMENTATION', ], 'msvs_settings': { 'VCLinkerTool': { # Additionally, since they are loaded locally, suppress these # warnings. 'AdditionalOptions': [ '/IGNORE:4049', '/IGNORE:4217', ], }, }, 'conditions': [ ['oemcrypto_lib=="ref"', { 'dependencies': [ 'oec_ref_shared', ], }], ['oemcrypto_lib=="level3"', { 'sources': [ # The test impl of OEMCrypto_Level3FileSystem and its factory. 'test/level3_file_system_ce_test.h', 'test/level3_file_system_ce_test.cpp', 'test/level3_file_system_ce_test_factory.cpp', ], 'conditions': [ ['oemcrypto_adapter=="static"', { 'dependencies': [ '../oemcrypto/level3/oec_level3.gyp:oec_level3_static', ], }, { 'dependencies': [ '../oemcrypto/level3/oec_level3.gyp:oec_level3_dynamic', ], }], ], }], ], }, { 'target_name': 'oec_ref', 'type': 'static_library', 'standalone_static_library': 1, 'hard_dependency': 1, 'includes': [ '../oemcrypto/ref/oec_ref.gypi', ], }, { 'target_name': 'oec_ref_shared', 'type': 'shared_library', 'dependencies': [ 'oec_ref' ], }, ], }