widevine_cdm.gyp revision 5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7
1# Copyright (c) 2012 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{ 6 'variables': { 7 'widevine_cdm_version_h_file%': 'widevine_cdm_version.h', 8 'widevine_cdm_binary_files%': [], 9 'conditions': [ 10 [ 'branding == "Chrome"', { 11 'conditions': [ 12 [ 'chromeos == 1', { 13 'widevine_cdm_version_h_file%': 14 'chromeos/<(target_arch)/widevine_cdm_version.h', 15 'widevine_cdm_binary_files%': [ 16 'chromeos/<(target_arch)/libwidevinecdm.so', 17 ], 18 }], 19 [ 'OS == "linux" and chromeos == 0', { 20 'widevine_cdm_version_h_file%': 21 'linux/<(target_arch)/widevine_cdm_version.h', 22 'widevine_cdm_binary_files%': [ 23 'linux/<(target_arch)/libwidevinecdm.so', 24 ], 25 }], 26 [ 'OS == "mac"', { 27 'widevine_cdm_version_h_file%': 28 'mac/<(target_arch)/widevine_cdm_version.h', 29 'widevine_cdm_binary_files%': [ 30 'mac/<(target_arch)/libwidevinecdm.dylib', 31 ], 32 }], 33 [ 'OS == "win"', { 34 'widevine_cdm_version_h_file%': 35 'win/<(target_arch)/widevine_cdm_version.h', 36 'widevine_cdm_binary_files%': [ 37 'win/<(target_arch)/widevinecdm.dll', 38 'win/<(target_arch)/widevinecdm.dll.lib', 39 ], 40 }], 41 ], 42 }], 43 [ 'OS == "android"', { 44 'widevine_cdm_version_h_file%': 45 'android/widevine_cdm_version.h', 46 }], 47 ], 48 }, 49 # Always provide a target, so we can put the logic about whether there's 50 # anything to be done in this file (instead of a higher-level .gyp file). 51 'targets': [ 52 { 53 'target_name': 'widevinecdmadapter', 54 'type': 'none', 55 'conditions': [ 56 [ 'branding == "Chrome" and enable_pepper_cdms==1', { 57 'dependencies': [ 58 '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp', 59 '<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', 60 'widevine_cdm_version_h', 61 'widevine_cdm_binaries', 62 ], 63 'conditions': [ 64 [ 'os_posix == 1 and OS != "mac"', { 65 'libraries': [ 66 # Copied by widevine_cdm_binaries. 67 '<(PRODUCT_DIR)/libwidevinecdm.so', 68 ], 69 }], 70 [ 'OS == "win"', { 71 'libraries': [ 72 # Copied by widevine_cdm_binaries. 73 '<(PRODUCT_DIR)/widevinecdm.dll.lib', 74 ], 75 }], 76 [ 'OS == "mac"', { 77 'libraries': [ 78 # Copied by widevine_cdm_binaries. 79 '<(PRODUCT_DIR)/libwidevinecdm.dylib', 80 ], 81 }], 82 ], 83 }], 84 ], 85 }, 86 { 87 'target_name': 'widevine_cdm_version_h', 88 'type': 'none', 89 'copies': [{ 90 'destination': '<(SHARED_INTERMEDIATE_DIR)', 91 'files': [ '<(widevine_cdm_version_h_file)' ], 92 }], 93 }, 94 { 95 'target_name': 'widevine_cdm_binaries', 96 'type': 'none', 97 'conditions': [ 98 [ 'OS=="mac"', { 99 'xcode_settings': { 100 'COPY_PHASE_STRIP': 'NO', 101 } 102 }], 103 ], 104 'copies': [{ 105 # TODO(ddorwin): Do we need a sub-directory? We either need a 106 # sub-directory or to rename manifest.json before we can copy it. 107 'destination': '<(PRODUCT_DIR)', 108 'files': [ '<@(widevine_cdm_binary_files)' ], 109 }], 110 }, 111 ], 112} 113