forked from arronzhang/mmseg-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwscript
More file actions
31 lines (28 loc) · 968 Bytes
/
wscript
File metadata and controls
31 lines (28 loc) · 968 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#MMSEG_PATH
import os
srcdir = "."
blddir = "build"
VERSION = "0.0.1"
def set_options(opt):
opt.tool_options("compiler_cxx")
def configure(conf):
mmsegpath = os.environ.get('MMSEG_PATH')
libpath = ['/usr/lib', '/usr/local/lib']
if mmsegpath != None:
libpath.append('/'.join([mmsegpath,'lib']))
conf.check_tool("compiler_cxx")
conf.check_tool("node_addon")
conf.check(lib='stdc++', libpath=['/usr/lib', '/usr/local/lib'], uselib_store='LIBSTDC')
conf.check(lib='mmseg', libpath=libpath, uselib_store='LIBMMSEG')
conf.env.append_value('CCFLAGS', ['-O3'])
conf.env.set_variant("default")
def build(bld):
mmsegpath = os.environ.get('MMSEG_PATH')
includepath = ["/usr/local/include/mmseg"]
if mmsegpath != None:
includepath.append('/'.join([mmsegpath,'include']))
obj = bld.new_task_gen("cxx", "shlib", "node_addon")
obj.target = "mmseg"
obj.source = "mmseg.cc"
obj.uselib = ["LIBSTDC", "LIBMMSEG"]
obj.includes = includepath