/
SConscript
46 lines (39 loc) · 1.81 KB
/
SConscript
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python
from os import path
Import('build env module')
env.Append(LIBPATH=[build.get_module('tiapp').dir])
env.Append(CPPPATH = ['%s/modules/ti.App' % build.titanium_source_dir])
build.add_thirdparty(env, 'poco')
build.add_thirdparty(env, 'webkit')
env.Append(LIBS=['tiappmodule'])
# If we are on Mac use the system installed WebKit.
# Otherwise use our build of WebKit on all other platforms.
if build.is_osx():
env.Append(FRAMEWORKS=['WebKit', 'JavaScriptCore'])
else:
build.add_thirdparty(env, 'webkit')
sources = Glob('*.cpp') + ['url/URLUtils.cpp']
if build.is_linux():
sources = sources + Glob('gtk/*.cpp')
env.Append(LIBS=['Xss', 'libsoup-2.4', 'libsoup-gnome-2.4'])
env.ParseConfig('PKG_CONFIG_PATH=${PKG_CONFIG_PATH} pkg-config --cflags --libs libnotify gtk+-2.0 gdk-2.0 x11 xext')
elif build.is_win32():
build.add_thirdparty(env, 'cairo')
sources = sources + Glob('win/*.cpp')
sources += Glob('binding/kjs*.cpp')
env.Append(CPPPATH=[build.tp('icu', 'include')])
env.Append(LIBS=[
'kernel32', 'shell32', 'user32', 'ole32', 'comdlg32', 'comctl32',
'gdi32', 'shlwapi', 'oleaut32', 'icuuc', 'pthreadVC2', 'libcurl_imp',
'comsuppw', 'advapi32'])
env.Append(CCFLAGS=['/MD', '/DUNICODE', '/D_UNICODE'])
env.Append(LINKFLAGS=['/NODEFAULTLIB:LIBCMT.lib', '/LTCG', '/INCREMENTAL:NO', '/OPT:REF'])
elif build.is_osx():
env.Append(FRAMEWORKPATH=[build.tp('growl')])
env.Append(FRAMEWORKS=['Cocoa','Carbon', 'IOKit', 'Growl'])
sources = sources + Glob('mac/*.mm') + Glob('mac/*.cpp')
env.Append(CCFLAGS=['-x', 'objective-c++'])
# Copy the support files the module build directory
build.utils.LightWeightCopy(path.join(build.cwd(), 'support'), module.dir)
build.mark_build_target(env.SharedLibrary(
path.join(module.dir,'tiuimodule'), sources))