Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1 | # Copyright 2016 Google Inc. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | |
| 6 | declare_args() { |
Mike Klein | e459afd | 2017-03-03 09:21:30 -0500 | [diff] [blame] | 7 | skia_use_system_lua = is_official_build |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 8 | } |
| 9 | |
| 10 | import("../third_party.gni") |
| 11 | |
| 12 | if (skia_use_system_lua) { |
| 13 | system("lua") { |
| 14 | libs = [ "lua" ] |
| 15 | } |
| 16 | } else { |
| 17 | third_party("lua") { |
Mike Klein | b19737d | 2018-01-10 08:09:06 -0500 | [diff] [blame] | 18 | public_include_dirs = [ "../externals/lua" ] |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 19 | |
| 20 | sources = [ |
Mike Klein | b19737d | 2018-01-10 08:09:06 -0500 | [diff] [blame] | 21 | "../externals/lua/lapi.c", |
| 22 | "../externals/lua/lauxlib.c", |
| 23 | "../externals/lua/lbaselib.c", |
| 24 | "../externals/lua/lbitlib.c", |
| 25 | "../externals/lua/lcode.c", |
| 26 | "../externals/lua/lcorolib.c", |
| 27 | "../externals/lua/lctype.c", |
| 28 | "../externals/lua/ldblib.c", |
| 29 | "../externals/lua/ldebug.c", |
| 30 | "../externals/lua/ldo.c", |
| 31 | "../externals/lua/ldump.c", |
| 32 | "../externals/lua/lfunc.c", |
| 33 | "../externals/lua/lgc.c", |
| 34 | "../externals/lua/linit.c", |
| 35 | "../externals/lua/liolib.c", |
| 36 | "../externals/lua/llex.c", |
| 37 | "../externals/lua/lmathlib.c", |
| 38 | "../externals/lua/lmem.c", |
| 39 | "../externals/lua/loadlib.c", |
| 40 | "../externals/lua/lobject.c", |
| 41 | "../externals/lua/lopcodes.c", |
| 42 | "../externals/lua/loslib.c", |
| 43 | "../externals/lua/lparser.c", |
| 44 | "../externals/lua/lstate.c", |
| 45 | "../externals/lua/lstring.c", |
| 46 | "../externals/lua/lstrlib.c", |
| 47 | "../externals/lua/ltable.c", |
| 48 | "../externals/lua/ltablib.c", |
| 49 | "../externals/lua/ltm.c", |
| 50 | "../externals/lua/lundump.c", |
| 51 | "../externals/lua/lutf8lib.c", |
| 52 | "../externals/lua/lvm.c", |
| 53 | "../externals/lua/lzio.c", |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 54 | ] |
Mike Klein | bec7ec6 | 2018-02-01 17:10:03 -0500 | [diff] [blame] | 55 | |
| 56 | if (!is_win) { |
| 57 | # Prefer mkstemp() over tmpnam(). This isn't super important, |
| 58 | # but it does stifle an annoying GNU linker warning. |
| 59 | defines = [ "LUA_USE_POSIX=1" ] |
| 60 | } |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 61 | } |
| 62 | } |