Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 32 lines (27 sloc) 1.07 kb
b7f7386 @ronnywang wscript add pkg_config support
ronnywang authored
1 from os import popen
2 import Utils
3
4093c78 @grumdrig Initial commit of contents of svn repo. node_sqlite is sqlite3 bindings ...
authored
4 srcdir = "."
5 blddir = "build"
6 VERSION = "0.0.1"
7
8 def set_options(opt):
9 opt.tool_options("compiler_cxx")
10
11 def configure(conf):
12 conf.check_tool("compiler_cxx")
13 conf.check_tool("node_addon")
b7f7386 @ronnywang wscript add pkg_config support
ronnywang authored
14 pkg_config = conf.find_program('pkg-config', var='PKG_CONFIG', mandatory=True)
15 sqlite3_libdir = popen("%s sqlite3 --libs-only-L" % pkg_config).readline().strip();
16 if sqlite3_libdir == "":
17 sqlite3_libdir = "/usr/lib"
18 sqlite3_libdir = sqlite3_libdir.replace("-L", "")
19 sqlite3_includedir = popen("%s sqlite3 --cflags-only-I" % pkg_config).readline().strip();
20 if sqlite3_includedir == "":
21 sqlite3_includedir = "/usr/include"
22 sqlite3_includedir = sqlite3_includedir.replace("-I", "")
23 conf.env.append_value("LIBPATH_SQLITE3", sqlite3_libdir)
24 conf.env.append_value('CPPPATH_SQLITE3', sqlite3_includedir)
25 conf.env.append_value("LIB_SQLITE3", "sqlite3")
4093c78 @grumdrig Initial commit of contents of svn repo. node_sqlite is sqlite3 bindings ...
authored
26
27 def build(bld):
28 obj = bld.new_task_gen("cxx", "shlib", "node_addon")
29 obj.target = "sqlite3_bindings"
30 obj.source = "sqlite3_bindings.cc"
b7f7386 @ronnywang wscript add pkg_config support
ronnywang authored
31 obj.uselib = "SQLITE3"
Something went wrong with that request. Please try again.