Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 31 lines (24 sloc) 0.951 kB
ed33d83 @pkrumins it's working
authored
1 import Options
2 from os import unlink, symlink, popen
3 from os.path import exists
4
5 srcdir = "."
6 blddir = "build"
7 VERSION = "0.0.1"
8
9 def set_options(opt):
10 opt.tool_options("compiler_cxx")
11
12 def configure(conf):
13 conf.check_tool("compiler_cxx")
14 conf.check_tool("node_addon")
15 conf.check(lib='jpeg', libpath=['/lib', '/usr/lib', '/usr/local/lib', '/usr/local/libjpeg/lib', '/usr/local/pkg/jpeg-8b/lib'])
16
17 def build(bld):
18 obj = bld.new_task_gen("cxx", "shlib", "node_addon")
19 obj.target = "jpeg"
7248a56 @pkrumins rename .cc -> .cpp
authored
20 obj.source = "src/common.cpp src/jpeg_encoder.cpp src/jpeg.cpp src/fixed_jpeg_stack.cpp src/dynamic_jpeg_stack.cpp src/module.cpp"
ed33d83 @pkrumins it's working
authored
21 obj.uselib = "JPEG"
4020d26 @pkrumins Jpeg class is now async!
authored
22 obj.cxxflags = ["-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE"]
ed33d83 @pkrumins it's working
authored
23
24 def shutdown():
25 if Options.commands['clean']:
26 if exists('jpeg.node'): unlink('jpeg.node')
27 else:
28 if exists('build/default/jpeg.node') and not exists('jpeg.node'):
29 symlink('build/default/jpeg.node', 'jpeg.node')
30
Something went wrong with that request. Please try again.