Index: ppapi/examples/ppapi_example.gni |
diff --git a/ppapi/examples/ppapi_example.gni b/ppapi/examples/ppapi_example.gni |
index 5345b1df0c139e4ad966bab4465ea82681d18f0a..3cedcc027dc85402fc080dc25e4b15434d091769 100644 |
--- a/ppapi/examples/ppapi_example.gni |
+++ b/ppapi/examples/ppapi_example.gni |
@@ -2,21 +2,35 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+if (is_mac) { |
+ import("//build/config/mac/rules.gni") |
+} |
+ |
# Declares a PPAPI example target of the correct type for the current platform |
# and with the right linker flags. |
template("ppapi_example") { |
- # TODO(GYP) on Mac this should be loadable_module. |
- shared_library(target_name) { |
- testonly = true |
- if (defined(invoker.output_name)) { |
- output_name = invoker.output_name |
+ if (!is_mac) { |
+ shared_library(target_name) { |
+ testonly = true |
+ |
+ if (defined(invoker.output_name)) { |
+ output_name = invoker.output_name |
+ } |
+ |
+ sources = invoker.sources |
+ deps = invoker.deps |
} |
- sources = invoker.sources |
- deps = invoker.deps |
+ } else { |
+ mac_plugin_bundle(target_name) { |
+ testonly = true |
+ |
+ if (defined(invoker.output_name)) { |
+ output_name = invoker.output_name |
+ } |
+ |
+ sources = invoker.sources |
+ deps = invoker.deps |
- if (is_mac) { |
- # TODO(GYP) this should be a mac bundle |
- output_extension = "plugin" |
ldflags = [ |
# Not to strip important symbols by -Wl,-dead_strip. |
"-Wl,-exported_symbol,_PPP_GetInterface", |