Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # This template defines a CDM adapter target. Just use this as you would a | 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 | 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 | 7 # depend on media/media_cdm_adapter.gyp:cdmadapter which would in turn modify |
| 8 # your target with direct_dependent_settings. | 8 # your target with direct_dependent_settings. |
| 9 template("cdm_adapter") { | 9 template("cdm_adapter") { |
| 10 # TODO(GYP) On Mac/Linux this should be a loadable_module. | 10 # TODO(GYP) On Mac/Linux this should be a loadable_module. |
| 11 shared_library(target_name) { | 11 shared_library(target_name) { |
| 12 # Don't filter sources list again. | 12 # Don't filter sources list again. |
| 13 set_sources_assignment_filter([]) | 13 set_sources_assignment_filter([]) |
| 14 cflags = [] | |
| 15 sources = [] | |
| 16 ldflags = [] | |
| 17 libs = [] | |
| 18 forward_variables_from(invoker, "*") | |
| 14 | 19 |
| 15 sources = [ | 20 sources += [ |
| 16 "//media/cdm/ppapi/api/content_decryption_module.h", | 21 "//media/cdm/ppapi/api/content_decryption_module.h", |
| 17 "//media/cdm/ppapi/cdm_adapter.cc", | 22 "//media/cdm/ppapi/cdm_adapter.cc", |
| 18 "//media/cdm/ppapi/cdm_adapter.h", | 23 "//media/cdm/ppapi/cdm_adapter.h", |
| 19 "//media/cdm/ppapi/cdm_file_io_impl.cc", | 24 "//media/cdm/ppapi/cdm_file_io_impl.cc", |
| 20 "//media/cdm/ppapi/cdm_file_io_impl.h", | 25 "//media/cdm/ppapi/cdm_file_io_impl.h", |
| 21 "//media/cdm/ppapi/cdm_helpers.cc", | 26 "//media/cdm/ppapi/cdm_helpers.cc", |
| 22 "//media/cdm/ppapi/cdm_helpers.h", | 27 "//media/cdm/ppapi/cdm_helpers.h", |
| 23 "//media/cdm/ppapi/cdm_logging.cc", | 28 "//media/cdm/ppapi/cdm_logging.cc", |
| 24 "//media/cdm/ppapi/cdm_logging.h", | 29 "//media/cdm/ppapi/cdm_logging.h", |
| 25 "//media/cdm/ppapi/cdm_wrapper.h", | 30 "//media/cdm/ppapi/cdm_wrapper.h", |
| 26 "//media/cdm/ppapi/linked_ptr.h", | 31 "//media/cdm/ppapi/linked_ptr.h", |
| 27 "//media/cdm/ppapi/supported_cdm_versions.h", | 32 "//media/cdm/ppapi/supported_cdm_versions.h", |
| 28 ] | 33 ] |
| 29 if (defined(invoker.sources)) { | |
| 30 sources += invoker.sources | |
| 31 } | |
| 32 | |
| 33 if (is_mac) { | 34 if (is_mac) { |
| 34 ldflags = [ | 35 ldflags += [ |
| 35 # Not to strip important symbols by -Wl,-dead_strip. | 36 # Not to strip important symbols by -Wl,-dead_strip. |
| 36 "-Wl,-exported_symbol,_PPP_GetInterface", | 37 "-Wl,-exported_symbol,_PPP_GetInterface", |
| 37 "-Wl,-exported_symbol,_PPP_InitializeModule", | 38 "-Wl,-exported_symbol,_PPP_InitializeModule", |
| 38 "-Wl,-exported_symbol,_PPP_ShutdownModule", | 39 "-Wl,-exported_symbol,_PPP_ShutdownModule", |
| 39 ] | 40 ] |
| 40 #TODO(GYP) Mac: 'DYLIB_INSTALL_NAME_BASE': '@loader_path', | 41 #TODO(GYP) Mac: 'DYLIB_INSTALL_NAME_BASE': '@loader_path', |
| 41 } else if (is_posix && !is_mac) { | 42 } else if (is_posix) { |
|
brettw
2015/08/11 01:28:02
Just making sure you meant to remove the mac condi
agrieve
2015/08/11 13:53:04
Yep - it's redundant since there's "if (is_mac) {"
| |
| 42 cflags = [ "-fvisibility=hidden" ] | 43 cflags += [ "-fvisibility=hidden" ] |
| 43 # Note GYP sets rpath but this is set by default on shared libraries in | 44 |
| 44 # the GN build. | 45 # Required for clock_gettime() |
| 46 libs += [ "rt" ] | |
| 45 } | 47 } |
| 46 | 48 |
| 47 # TODO(jschuh) crbug.com/167187 | 49 # TODO(jschuh) crbug.com/167187 |
| 48 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 50 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 49 | |
| 50 if (defined(invoker.all_dependent_configs)) { | |
| 51 all_dependent_configs = invoker.all_dependent_configs | |
| 52 } | |
| 53 if (defined(invoker.allow_circular_includes_from)) { | |
| 54 allow_circular_includes_from = invoker.allow_circular_includes_from | |
| 55 } | |
| 56 if (defined(invoker.cflags)) { | |
| 57 cflags = invoker.cflags | |
| 58 } | |
| 59 if (defined(invoker.cflags_c)) { | |
| 60 cflags_c = invoker.cflags_c | |
| 61 } | |
| 62 if (defined(invoker.cflags_cc)) { | |
| 63 cflags_cc = invoker.cflags_cc | |
| 64 } | |
| 65 if (defined(invoker.cflags_objc)) { | |
| 66 cflags_objc = invoker.cflags_objc | |
| 67 } | |
| 68 if (defined(invoker.cflags_objcc)) { | |
| 69 cflags_objcc = invoker.cflags_objcc | |
| 70 } | |
| 71 if (defined(invoker.check_includes)) { | |
| 72 check_includes = invoker.check_includes | |
| 73 } | |
| 74 if (defined(invoker.data)) { | |
| 75 data = invoker.data | |
| 76 } | |
| 77 if (defined(invoker.data_deps)) { | |
| 78 data_deps = invoker.data_deps | |
| 79 } | |
| 80 if (defined(invoker.datadeps)) { | |
| 81 datadeps = invoker.datadeps | |
| 82 } | |
| 83 if (defined(invoker.defines)) { | |
| 84 defines = invoker.defines | |
| 85 } | |
| 86 if (defined(invoker.deps)) { | |
| 87 deps = invoker.deps | |
| 88 } | |
| 89 if (defined(invoker.forward_dependent_configs_from)) { | |
| 90 forward_dependent_configs_from = invoker.forward_dependent_configs_from | |
| 91 } | |
| 92 if (defined(invoker.include_dirs)) { | |
| 93 include_dirs = invoker.include_dirs | |
| 94 } | |
| 95 if (defined(invoker.ldflags)) { | |
| 96 ldflags = invoker.ldflags | |
| 97 } | |
| 98 if (defined(invoker.lib_dirs)) { | |
| 99 lib_dirs = invoker.lib_dirs | |
| 100 } | |
| 101 if (defined(invoker.libs)) { | |
| 102 libs = invoker.libs | |
| 103 } | |
| 104 if (defined(invoker.output_extension)) { | |
| 105 output_extension = invoker.output_extension | |
| 106 } | |
| 107 if (defined(invoker.output_name)) { | |
| 108 output_name = invoker.output_name | |
| 109 } | |
| 110 if (defined(invoker.public)) { | |
| 111 public = invoker.public | |
| 112 } | |
| 113 if (defined(invoker.public_configs)) { | |
| 114 public_configs = invoker.public_configs | |
| 115 } | |
| 116 if (defined(invoker.public_deps)) { | |
| 117 public_deps = invoker.public_deps | |
| 118 } | |
| 119 if (defined(invoker.testonly)) { | |
| 120 testonly = invoker.testonly | |
| 121 } | |
| 122 if (defined(invoker.visibility)) { | |
| 123 visibility = invoker.visibility | |
| 124 } | |
| 125 } | 51 } |
| 126 } | 52 } |
| OLD | NEW |