Browse Source

#2 - dynamically find lua include

v0.1.x
Brett Langdon 13 years ago
parent
commit
a4a1a7fd07
2 changed files with 14 additions and 7 deletions
  1. +13
    -6
      binding.gyp
  2. +1
    -1
      package.json

+ 13
- 6
binding.gyp View File

@ -2,16 +2,23 @@
"targets": [
{
"target_name": "nodelua",
"sources": [
"src/utils.cc",
"src/luafunction.cc",
"variables": {
"lua_include": "<!(find /usr/include /usr/local/include -name lua.h | sed s/lua.h//)",
"lua_version": "<!(lua -v 2>&1 | grep -oP '\d\.\d')"
},
"sources": [
"src/utils.cc",
"src/luafunction.cc",
"src/luaobject.cc",
"src/nodelua.cc"
],
"include_dirs": [
"<@(lua_include)",
],
"libraries": [
"-llua",
"-ldl"
"<!(pkg-config --libs-only-l --silence-errors lua || pkg-config --libs-only-l --silence-errors lua5.1)",
"-ldl"
]
}
]
}
}

+ 1
- 1
package.json View File

@ -1,6 +1,6 @@
{
"name": "nodelua",
"version": "0.1.5",
"version": "0.1.6",
"description": "Lua Bindings For Node.JS",
"keywords": [
"lua"


Loading…
Cancel
Save