OLD | NEW |
(Empty) | |
| 1 # Copyright 2015 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 template defines a CDM adapter target. Just use this as you would a |
| 6 # normal target and everything should work correctly. If GYP, you would instead |
| 7 # depend on media/media_cdm_adapter.gyp:cdmadapter which would in turn modify |
| 8 # your target with direct_dependent_settings. |
| 9 template("cdm_adapter") { |
| 10 # TODO(GYP) On Mac/Linux this should be a loadable_module. |
| 11 shared_library(target_name) { |
| 12 # Don't filter sources list again. |
| 13 set_sources_assignment_filter([]) |
| 14 |
| 15 sources = [ |
| 16 "//media/cdm/ppapi/api/content_decryption_module.h", |
| 17 "//media/cdm/ppapi/cdm_adapter.cc", |
| 18 "//media/cdm/ppapi/cdm_adapter.h", |
| 19 "//media/cdm/ppapi/cdm_file_io_impl.cc", |
| 20 "//media/cdm/ppapi/cdm_file_io_impl.h", |
| 21 "//media/cdm/ppapi/cdm_helpers.cc", |
| 22 "//media/cdm/ppapi/cdm_helpers.h", |
| 23 "//media/cdm/ppapi/cdm_logging.cc", |
| 24 "//media/cdm/ppapi/cdm_logging.h", |
| 25 "//media/cdm/ppapi/cdm_wrapper.h", |
| 26 "//media/cdm/ppapi/linked_ptr.h", |
| 27 "//media/cdm/ppapi/supported_cdm_versions.h", |
| 28 ] |
| 29 if (defined(invoker.sources)) { |
| 30 sources += invoker.sources |
| 31 } |
| 32 |
| 33 if (is_mac) { |
| 34 ldflags = [ |
| 35 # Not to strip important symbols by -Wl,-dead_strip. |
| 36 "-Wl,-exported_symbol,_PPP_GetInterface", |
| 37 "-Wl,-exported_symbol,_PPP_InitializeModule", |
| 38 "-Wl,-exported_symbol,_PPP_ShutdownModule", |
| 39 ] |
| 40 #TODO(GYP) Mac: 'DYLIB_INSTALL_NAME_BASE': '@loader_path', |
| 41 } else if (is_posix && !is_mac) { |
| 42 cflags = [ "-fvisibility=hidden" ] |
| 43 # Note GYP sets rpath but this is set by default on shared libraries. |
| 44 } |
| 45 |
| 46 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 47 |
| 48 if (defined(invoker.all_dependent_configs)) { |
| 49 all_dependent_configs = invoker.all_dependent_configs |
| 50 } |
| 51 if (defined(invoker.allow_circular_includes_from)) { |
| 52 allow_circular_includes_from = invoker.allow_circular_includes_from |
| 53 } |
| 54 if (defined(invoker.cflags)) { |
| 55 cflags = invoker.cflags |
| 56 } |
| 57 if (defined(invoker.cflags_c)) { |
| 58 cflags_c = invoker.cflags_c |
| 59 } |
| 60 if (defined(invoker.cflags_cc)) { |
| 61 cflags_cc = invoker.cflags_cc |
| 62 } |
| 63 if (defined(invoker.cflags_objc)) { |
| 64 cflags_objc = invoker.cflags_objc |
| 65 } |
| 66 if (defined(invoker.cflags_objcc)) { |
| 67 cflags_objcc = invoker.cflags_objcc |
| 68 } |
| 69 if (defined(invoker.check_includes)) { |
| 70 check_includes = invoker.check_includes |
| 71 } |
| 72 if (defined(invoker.data)) { |
| 73 data = invoker.data |
| 74 } |
| 75 if (defined(invoker.data_deps)) { |
| 76 data_deps = invoker.data_deps |
| 77 } |
| 78 if (defined(invoker.datadeps)) { |
| 79 datadeps = invoker.datadeps |
| 80 } |
| 81 if (defined(invoker.defines)) { |
| 82 defines = invoker.defines |
| 83 } |
| 84 if (defined(invoker.deps)) { |
| 85 deps = invoker.deps |
| 86 } |
| 87 if (defined(invoker.direct_dependent_configs)) { |
| 88 direct_dependent_configs = invoker.direct_dependent_configs |
| 89 } |
| 90 if (defined(invoker.forward_dependent_configs_from)) { |
| 91 forward_dependent_configs_from = invoker.forward_dependent_configs_from |
| 92 } |
| 93 if (defined(invoker.include_dirs)) { |
| 94 include_dirs = invoker.include_dirs |
| 95 } |
| 96 if (defined(invoker.ldflags)) { |
| 97 ldflags = invoker.ldflags |
| 98 } |
| 99 if (defined(invoker.lib_dirs)) { |
| 100 lib_dirs = invoker.lib_dirs |
| 101 } |
| 102 if (defined(invoker.libs)) { |
| 103 libs = invoker.libs |
| 104 } |
| 105 if (defined(invoker.output_extension)) { |
| 106 output_extension = invoker.output_extension |
| 107 } |
| 108 if (defined(invoker.output_name)) { |
| 109 output_name = invoker.output_name |
| 110 } |
| 111 if (defined(invoker.public)) { |
| 112 public = invoker.public |
| 113 } |
| 114 if (defined(invoker.public_configs)) { |
| 115 public_configs = invoker.public_configs |
| 116 } |
| 117 if (defined(invoker.public_deps)) { |
| 118 public_deps = invoker.public_deps |
| 119 } |
| 120 if (defined(invoker.testonly)) { |
| 121 testonly = invoker.testonly |
| 122 } |
| 123 if (defined(invoker.visibility)) { |
| 124 visibility = invoker.visibility |
| 125 } |
| 126 } |
| 127 } |
OLD | NEW |