Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: ppapi/examples/ppapi_example.gni

Issue 1903623002: [Mac/GN] Get //ppapi tests and examples working. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-framework-content
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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",
« no previous file with comments | « ppapi/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698