2016-11-11 16:39:44 +00:00
|
|
|
# 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() {
|
2017-03-03 14:21:30 +00:00
|
|
|
skia_use_system_lua = is_official_build
|
2016-11-11 16:39:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
import("../third_party.gni")
|
|
|
|
|
|
|
|
if (skia_use_system_lua) {
|
|
|
|
system("lua") {
|
|
|
|
libs = [ "lua" ]
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
third_party("lua") {
|
2018-01-10 13:09:06 +00:00
|
|
|
public_include_dirs = [ "../externals/lua" ]
|
2016-11-11 16:39:44 +00:00
|
|
|
|
|
|
|
sources = [
|
2018-01-10 13:09:06 +00:00
|
|
|
"../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",
|
2016-11-11 16:39:44 +00:00
|
|
|
]
|
2018-02-01 22:10:03 +00:00
|
|
|
|
|
|
|
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" ]
|
|
|
|
}
|
2016-11-11 16:39:44 +00:00
|
|
|
}
|
|
|
|
}
|