-
Notifications
You must be signed in to change notification settings - Fork 3
/
wscript
25 lines (20 loc) · 954 Bytes
/
wscript
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
from os import unlink, symlink, popen
from os.path import exists
def set_options(opt):
opt.tool_options("compiler_cxx")
def configure(conf):
conf.check_tool("compiler_cxx")
conf.check_tool("node_addon")
conf.check_cfg(package='QtCore', args='--cflags --libs', uselib_store='QtCore', mandatory=True)
conf.check_cfg(package='QtGui', args='--cflags --libs', uselib_store='QtGui', mandatory=True)
conf.check_cfg(package='QtWebKit', args='--cflags --libs', uselib_store='QtWebKit', mandatory=True)
def build(bld):
obj = bld.new_task_gen("cxx", "shlib", "node_addon")
obj.cxxflags = ['-DQT_NO_DEBUG', '-DQT_GUI_LIB', '-DQT_CORE_LIB', '-DQT_SHARED']
obj.target = "WebKitWindow"
obj.find_sources_in_dirs("src")
obj.uselib = "QtCore QtGui QtWebKit"
def shutdown():
if not exists('WebKitWindow.node'):
if exists('build/Release/WebKitWindow.node'):
symlink('build/Release/WebKitWindow.node', 'WebKitWindow.node')