skia2/third_party/lua/BUILD.gn
Mike Klein bec7ec6497 avoid using tmpnam() in Lua
Change-Id: I9e3d82445bb26b98ff6a60dff28f9655cc9ea1fb
Reviewed-on: https://skia-review.googlesource.com/102624
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-02-01 22:39:59 +00:00

63 lines
1.7 KiB
Plaintext

# 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 = is_official_build
}
import("../third_party.gni")
if (skia_use_system_lua) {
system("lua") {
libs = [ "lua" ]
}
} else {
third_party("lua") {
public_include_dirs = [ "../externals/lua" ]
sources = [
"../externals/lua/lapi.c",
"../externals/lua/lauxlib.c",
"../externals/lua/lbaselib.c",
"../externals/lua/lbitlib.c",
"../externals/lua/lcode.c",
"../externals/lua/lcorolib.c",
"../externals/lua/lctype.c",
"../externals/lua/ldblib.c",
"../externals/lua/ldebug.c",
"../externals/lua/ldo.c",
"../externals/lua/ldump.c",
"../externals/lua/lfunc.c",
"../externals/lua/lgc.c",
"../externals/lua/linit.c",
"../externals/lua/liolib.c",
"../externals/lua/llex.c",
"../externals/lua/lmathlib.c",
"../externals/lua/lmem.c",
"../externals/lua/loadlib.c",
"../externals/lua/lobject.c",
"../externals/lua/lopcodes.c",
"../externals/lua/loslib.c",
"../externals/lua/lparser.c",
"../externals/lua/lstate.c",
"../externals/lua/lstring.c",
"../externals/lua/lstrlib.c",
"../externals/lua/ltable.c",
"../externals/lua/ltablib.c",
"../externals/lua/ltm.c",
"../externals/lua/lundump.c",
"../externals/lua/lutf8lib.c",
"../externals/lua/lvm.c",
"../externals/lua/lzio.c",
]
if (!is_win) {
# Prefer mkstemp() over tmpnam(). This isn't super important,
# but it does stifle an annoying GNU linker warning.
defines = [ "LUA_USE_POSIX=1" ]
}
}
}