Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8cdb580f4d
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (28 sloc) 1.184 kb
import Options, Utils
from os import unlink, symlink, chdir, system
from os.path import exists, lexists
srcdir = "."
blddir = "build"
VERSION = "0.1.0alpha2"
def set_options(opt):
opt.tool_options("compiler_cxx")
def configure(conf):
conf.env.CXX = 'clang'
conf.check_tool("compiler_cxx")
conf.check_tool("node_addon")
conf.check_cfg(mandatory = True, package='libgphoto2', args='--cflags --libs', uselib_store='GPHOTO2')
conf.check_cfg(mandatory = True, package='libgphoto2_port', args='--cflags --libs', uselib_store='GPHOTO2PORT')
conf.env.append_value('CXXFLAGS', ['-Wall', '-Qunused-arguments'])
def build(bld):
obj = bld.new_task_gen("cxx", "shlib", "node_addon")
obj.cxxflags = ["-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE"]
obj.uselib = "GPHOTO2 GPHOTO2PORT"
obj.target = "gphoto2"
obj.source = bld.glob("src/*.cc")
def shutdown(bld):
if Options.commands['clean'] and not Options.commands['build']:
if lexists('gphoto2.node'):
unlink('gphoto2.node')
elif Options.commands['build']:
if exists('build/Release/gphoto2.node') and not lexists('gphoto2.node'):
symlink('build/Release/gphoto2.node', 'gphoto2.node')
Jump to Line
Something went wrong with that request. Please try again.