aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/lua
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2016-11-11 11:39:44 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-11 17:34:36 +0000
commit38af9438d7b7fa838aff2931d9afb4dd4a82549d (patch)
tree6e6b5484bf2e6d1bd880eacffd395dd4c55b158d /third_party/lua
parent64dded3d95be625b65120a91ed29dd58112489d3 (diff)
GN: build Lua tools when skia_use_lua.
When we opt into Lua, this builds SampleLua into SampleApp, and the lua_app and lua_pictures tools. I've tested this builds with and without skia_use_system_lua on my Mac laptop and Linux desktop. I've made lua_pictures.cpp's flags static to avoid conflicts with flags in SkCommonFlags.cpp. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4699 DOCS_PREVIEW= https://skia.org/?cl=4699 Change-Id: I8176fd51d8a38746e7d730cfcce66da42b9a015a Reviewed-on: https://skia-review.googlesource.com/4699 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'third_party/lua')
-rw-r--r--third_party/lua/BUILD.gn55
1 files changed, 55 insertions, 0 deletions
diff --git a/third_party/lua/BUILD.gn b/third_party/lua/BUILD.gn
new file mode 100644
index 0000000000..9967dcd675
--- /dev/null
+++ b/third_party/lua/BUILD.gn
@@ -0,0 +1,55 @@
+# Copyright 2016 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+declare_args() {
+ skia_use_system_lua = false
+}
+
+import("../third_party.gni")
+
+if (skia_use_system_lua) {
+ system("lua") {
+ libs = [ "lua" ]
+ }
+} else {
+ third_party("lua") {
+ public_include_dirs = [ "src" ]
+
+ sources = [
+ "src/lapi.c",
+ "src/lauxlib.c",
+ "src/lbaselib.c",
+ "src/lbitlib.c",
+ "src/lcode.c",
+ "src/lcorolib.c",
+ "src/lctype.c",
+ "src/ldblib.c",
+ "src/ldebug.c",
+ "src/ldo.c",
+ "src/ldump.c",
+ "src/lfunc.c",
+ "src/lgc.c",
+ "src/linit.c",
+ "src/liolib.c",
+ "src/llex.c",
+ "src/lmathlib.c",
+ "src/lmem.c",
+ "src/loadlib.c",
+ "src/lobject.c",
+ "src/lopcodes.c",
+ "src/loslib.c",
+ "src/lparser.c",
+ "src/lstate.c",
+ "src/lstring.c",
+ "src/lstrlib.c",
+ "src/ltable.c",
+ "src/ltablib.c",
+ "src/ltm.c",
+ "src/lundump.c",
+ "src/lvm.c",
+ "src/lzio.c",
+ ]
+ }
+}