#!/usr/bin/env python
from os import path
Import('build env module')

env.Append(CPPDEFINES=('KROLL_JAVASCRIPT_API_EXPORT', 1))

build.add_thirdparty(env, 'poco')

build.add_thirdparty(env, 'webkit')

if build.is_win32():
	env.Append(LIBS=[
		'kernel32', 'shell32',
		'user32', 'ole32',
		'comctl32', 'shlwapi',
		'oleaut32', 'icuuc', 
		'pthreadVC2', 'kroll'])
	env.Append(LINKFLAGS=['/LTCG', '/INCREMENTAL:NO'])

build.mark_build_target(env.SharedLibrary(
	path.join(module.dir, 'javascriptmodule'), Glob('*.cpp')))
