| OLD | NEW |
| (Empty) |
| 1 # Copyright 2013 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. | |
| 4 | |
| 5 # This file defines a common base target for all CDM adapter implementations. | |
| 6 # We use 'direct_dependent_settings' to override target type and settings so | |
| 7 # that all CDM adapter implementations have the correct type and settings | |
| 8 # automatically. | |
| 9 # | |
| 10 # WARNING: Keep 'cdmadapter' target out of media.gyp. /build/all.gyp:All depends | |
| 11 # directly on media.gyp:*. If 'cdmadapter' is defined in media.gyp, then | |
| 12 # 'direct_dependent_settings' will be applied to 'All' target and bad | |
| 13 # things happen, e.g. the type of 'All' target becomes a plugin on Mac. | |
| 14 { | |
| 15 'conditions': [ | |
| 16 ['enable_pepper_cdms==1', { | |
| 17 'targets': [ | |
| 18 { | |
| 19 # GN version: Use the template cdm_adapter in | |
| 20 # //media/cdm/ppapi/ppapi_cdm_adapter.gni. | |
| 21 'target_name': 'cdmadapter', | |
| 22 'type': 'none', | |
| 23 'direct_dependent_settings': { | |
| 24 'defines': [ | |
| 25 'USE_PPAPI_CDM_ADAPTER', | |
| 26 ], | |
| 27 'sources': [ | |
| 28 'cdm/api/content_decryption_module.h', | |
| 29 'cdm/cdm_helpers.cc', | |
| 30 'cdm/cdm_helpers.h', | |
| 31 'cdm/cdm_wrapper.h', | |
| 32 'cdm/ppapi/ppapi_cdm_adapter.cc', | |
| 33 'cdm/ppapi/ppapi_cdm_adapter.h', | |
| 34 'cdm/ppapi/ppapi_cdm_buffer.cc', | |
| 35 'cdm/ppapi/ppapi_cdm_buffer.h', | |
| 36 'cdm/ppapi/cdm_file_io_impl.cc', | |
| 37 'cdm/ppapi/cdm_file_io_impl.h', | |
| 38 'cdm/ppapi/cdm_logging.cc', | |
| 39 'cdm/ppapi/cdm_logging.h', | |
| 40 'cdm/ppapi/linked_ptr.h', | |
| 41 'cdm/supported_cdm_versions.cc', | |
| 42 'cdm/supported_cdm_versions.h', | |
| 43 ], | |
| 44 'conditions': [ | |
| 45 ['os_posix == 1 and OS != "mac"', { | |
| 46 'cflags': ['-fvisibility=hidden'], | |
| 47 'type': 'loadable_module', | |
| 48 # Allow the adapter to find the CDM in the same directory. | |
| 49 'ldflags': ['-Wl,-rpath=\$$ORIGIN'], | |
| 50 }], | |
| 51 ['OS == "win"', { | |
| 52 'type': 'shared_library', | |
| 53 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | |
| 54 'msvs_disabled_warnings': [ 4267, ], | |
| 55 }], | |
| 56 ['OS == "mac"', { | |
| 57 'type': 'loadable_module', | |
| 58 'product_extension': 'plugin', | |
| 59 'xcode_settings': { | |
| 60 'OTHER_LDFLAGS': [ | |
| 61 # Not to strip important symbols by -Wl,-dead_strip. | |
| 62 '-Wl,-exported_symbol,_PPP_GetInterface', | |
| 63 '-Wl,-exported_symbol,_PPP_InitializeModule', | |
| 64 '-Wl,-exported_symbol,_PPP_ShutdownModule' | |
| 65 ], | |
| 66 'DYLIB_INSTALL_NAME_BASE': '@loader_path', | |
| 67 }, | |
| 68 }], | |
| 69 ], | |
| 70 }, | |
| 71 }, | |
| 72 ], | |
| 73 }], | |
| 74 ], | |
| 75 } | |
| OLD | NEW |