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

Unified Diff: mojo/public/mojo_application.gni

Issue 713513002: Change mojo application name to {name}.mojo (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « mojo/apps/js/BUILD.gn ('k') | mojo/services/clipboard/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/mojo_application.gni
diff --git a/mojo/public/mojo_application.gni b/mojo/public/mojo_application.gni
new file mode 100644
index 0000000000000000000000000000000000000000..c4ee04ada769e4a8d3465236ca2e69d8ede2178e
--- /dev/null
+++ b/mojo/public/mojo_application.gni
@@ -0,0 +1,117 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
Aaron Boodman 2014/11/07 18:02:47 You should get brettw to give this a once-over.
qsr 2014/11/12 10:04:59 Done.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Generate a binary mojo application.The parameters of this template are those
+# of a shared library.
+template("mojo_binary_application") {
Aaron Boodman 2014/11/07 18:02:47 "binary" is so fuzzy. Is a java application binary
DaveMoore 2014/11/07 18:24:41 Why not simply mojo_application? What other types
qsr 2014/11/12 10:04:59 Done.
+ if (defined(invoker.output_name)) {
+ output = invoker.output_name + ".mojo"
+ library_target_name = invoker.output_name + "_library"
+ } else {
+ output = target_name + ".mojo"
+ library_target_name = target_name + "_library"
+ }
+
+ if (is_linux || is_android) {
+ library_name = "lib${library_target_name}.so"
+ } else if (is_windows) {
+ library_name = "${library_target_name}.dll"
+ } else if (is_mac) {
+ library_name = "${library_target_name}.so"
+ } else {
+ assert(false, "Platform not supported.")
+ }
+
+ final_target_name = target_name
+
+ shared_library(library_target_name) {
+ if (defined(invoker.cflags)) {
Aaron Boodman 2014/11/07 18:02:47 Do we use all of these params right now? There are
qsr 2014/11/12 10:04:59 I put all the flags used by shared_library. This i
+ cflags = invoker.cflags
+ }
+ if (defined(invoker.cflags_c)) {
+ cflags_c = invoker.cflags_c
+ }
+ if (defined(invoker.cflags_cc)) {
+ cflags_cc = invoker.cflags_cc
+ }
+ if (defined(invoker.cflags_objc)) {
+ cflags_objc = invoker.cflags_objc
+ }
+ if (defined(invoker.cflags_objcc)) {
+ cflags_objcc = invoker.cflags_objcc
+ }
+ if (defined(invoker.defines)) {
+ defines = invoker.defines
+ }
+ if (defined(invoker.include_dirs)) {
+ include_dirs = invoker.include_dirs
+ }
+ if (defined(invoker.ldflags)) {
+ ldflags = invoker.ldflags
+ }
+ if (defined(invoker.lib_dirs)) {
+ lib_dirs = invoker.lib_dirs
+ }
+ if (defined(invoker.libs)) {
+ libs = invoker.libs
+ }
+ if (defined(invoker.datadeps)) {
+ datadeps = invoker.datadeps
+ }
+ if (defined(invoker.deps)) {
+ deps = invoker.deps
+ }
+ if (defined(invoker.forward_dependent_configs_from)) {
+ forward_dependent_configs_from = invoker.forward_dependent_configs_from
+ }
+ if (defined(invoker.public_deps)) {
+ public_deps = invoker.public_deps
+ }
+ if (defined(invoker.all_dependent_configs)) {
+ all_dependent_configs = invoker.all_dependent_configs
+ }
+ if (defined(invoker.public_configs)) {
+ public_configs = invoker.public_configs
+ }
+ if (defined(invoker.check_includes)) {
+ check_includes = invoker.check_includes
+ }
+ if (defined(invoker.configs)) {
+ configs = invoker.configs
+ }
+ if (defined(invoker.data)) {
+ data = invoker.data
+ }
+ if (defined(invoker.inputs)) {
+ inputs = invoker.inputs
+ }
+ if (defined(invoker.public)) {
+ public = invoker.public
+ }
+ if (defined(invoker.sources)) {
+ sources = invoker.sources
+ }
+ if (defined(invoker.testonly)) {
+ testonly = invoker.testonly
+ }
+
+ visibility = [
+ ":${final_target_name}",
+ ]
+ }
+
+ copy(final_target_name) {
+ if (defined(invoker.testonly)) {
+ testonly = invoker.testonly
+ }
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+ deps = [
+ ":${library_target_name}",
+ ]
+ sources = [ "${root_out_dir}/${library_name}" ]
+ outputs = [ "${root_out_dir}/${output}" ]
+ }
+}
« no previous file with comments | « mojo/apps/js/BUILD.gn ('k') | mojo/services/clipboard/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698