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.
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
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.
16 ['enable_pepper_cdms==1', {
19 'target_name': 'cdmadapter',
21 'direct_dependent_settings': {
23 'cdm/ppapi/api/content_decryption_module.h',
24 'cdm/ppapi/cdm_adapter.cc',
25 'cdm/ppapi/cdm_adapter.h',
26 'cdm/ppapi/cdm_file_io_impl.cc',
27 'cdm/ppapi/cdm_file_io_impl.h',
28 'cdm/ppapi/cdm_helpers.cc',
29 'cdm/ppapi/cdm_helpers.h',
30 'cdm/ppapi/cdm_logging.cc',
31 'cdm/ppapi/cdm_logging.h',
32 'cdm/ppapi/cdm_wrapper.h',
33 'cdm/ppapi/linked_ptr.h',
34 'cdm/ppapi/supported_cdm_versions.h',
37 ['os_posix == 1 and OS != "mac"', {
38 'cflags': ['-fvisibility=hidden'],
39 'type': 'loadable_module',
40 # Allow the adapter to find the CDM in the same directory.
41 'ldflags': ['-Wl,-rpath=\$$ORIGIN'],
44 'type': 'shared_library',
45 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
46 'msvs_disabled_warnings': [ 4267, ],
49 'type': 'loadable_module',
50 'product_extension': 'plugin',
53 # Not to strip important symbols by -Wl,-dead_strip.
54 '-Wl,-exported_symbol,_PPP_GetInterface',
55 '-Wl,-exported_symbol,_PPP_InitializeModule',
56 '-Wl,-exported_symbol,_PPP_ShutdownModule'
58 'DYLIB_INSTALL_NAME_BASE': '@loader_path',