summaryrefslogtreecommitdiffstats
path: root/media/media_cdm_adapter.gyp
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-19 01:08:23 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-19 01:08:23 +0000
commit8e0f4b4eb7802239c7cc999a4e77e868ee6e9409 (patch)
tree1df2e2bfb98b0f1eb55f640b8e8bf4c941efb248 /media/media_cdm_adapter.gyp
parent6ad3689049978411ecd67c2a60017c5d3a3d7152 (diff)
downloadchromium_src-8e0f4b4eb7802239c7cc999a4e77e868ee6e9409.zip
chromium_src-8e0f4b4eb7802239c7cc999a4e77e868ee6e9409.tar.gz
chromium_src-8e0f4b4eb7802239c7cc999a4e77e868ee6e9409.tar.bz2
Add media_cdm_adapter.gyp: a common base for all CDM adapters.
This removes duplicate code in CDM adapter gyp targets. Also move more code under the condition enable_pepper_cdms==1 so that when enable_pepper_cdms==0, clearkeycdm, clearkeycdmadapter and widevinecdmadapter targets won't exist. BUG=329097 TEST=Widevine and ClearKey CDM adapters still work. Review URL: https://codereview.chromium.org/108703004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241736 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/media_cdm_adapter.gyp')
-rw-r--r--media/media_cdm_adapter.gyp67
1 files changed, 67 insertions, 0 deletions
diff --git a/media/media_cdm_adapter.gyp b/media/media_cdm_adapter.gyp
new file mode 100644
index 0000000..e71efcc
--- /dev/null
+++ b/media/media_cdm_adapter.gyp
@@ -0,0 +1,67 @@
+# Copyright 2013 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 a common base target for all CDM adapter implementations.
+# We use 'direct_dependent_settings' to override target type and settings so
+# that all CDM adapter implementations have the correct type and settings
+# automatically.
+#
+# WARNING: Keep 'cdmadapter' target out of media.gyp. /build/all.gyp:All depends
+# directly on media.gyp:*. If 'cdmadapter' is defined in media.gyp, then
+# 'direct_dependent_settings' will be applied to 'All' target and bad
+# things happen, e.g. the type of 'All' target becomes a plugin on Mac.
+{
+ 'conditions': [
+ ['enable_pepper_cdms==1', {
+ 'targets': [
+ {
+ 'target_name': 'cdmadapter',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'sources': [
+ 'cdm/ppapi/api/content_decryption_module.h',
+ 'cdm/ppapi/cdm_adapter.cc',
+ 'cdm/ppapi/cdm_adapter.h',
+ 'cdm/ppapi/cdm_file_io_impl.cc',
+ 'cdm/ppapi/cdm_file_io_impl.h',
+ 'cdm/ppapi/cdm_helpers.cc',
+ 'cdm/ppapi/cdm_helpers.h',
+ 'cdm/ppapi/cdm_logging.cc',
+ 'cdm/ppapi/cdm_logging.h',
+ 'cdm/ppapi/cdm_wrapper.h',
+ 'cdm/ppapi/linked_ptr.h',
+ 'cdm/ppapi/supported_cdm_versions.h',
+ ],
+ 'conditions': [
+ ['os_posix == 1 and OS != "mac"', {
+ 'cflags': ['-fvisibility=hidden'],
+ 'type': 'loadable_module',
+ # Allow the adapter to find the CDM in the same directory.
+ 'ldflags': ['-Wl,-rpath=\$$ORIGIN'],
+ }],
+ ['OS == "win"', {
+ 'type': 'shared_library',
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ 'msvs_disabled_warnings': [ 4267, ],
+ }],
+ ['OS == "mac"', {
+ 'type': 'loadable_module',
+ 'product_extension': 'plugin',
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ # Not to strip important symbols by -Wl,-dead_strip.
+ '-Wl,-exported_symbol,_PPP_GetInterface',
+ '-Wl,-exported_symbol,_PPP_InitializeModule',
+ '-Wl,-exported_symbol,_PPP_ShutdownModule'
+ ],
+ 'DYLIB_INSTALL_NAME_BASE': '@loader_path',
+ },
+ }],
+ ],
+ },
+ },
+ ],
+ }],
+ ],
+}