This repository has been archived by the owner on Jan 15, 2022. It is now read-only.
forked from ethanhugg/ikran
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Sconscriptlib
60 lines (52 loc) · 1.71 KB
/
Sconscriptlib
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Import('build_env')
env = build_env.Clone()
import os,sys,shutil
Import ('debug')
Import ('componentName')
Import ('suffixName')
if sys.platform =='win32':
ms_vc_lib_dir=os.environ['MS_VC_PATH'] + '/VC/lib'
ms_vc_atlmfc_lib_dir=os.environ['MS_VC_PATH'] + '/VC/ATLMFC/lib'
windows_sdk_lib_dir=os.environ['MS_WINDOWS_SDK_PATH'] + '/lib'
src_files = [
'src/callControl.lib'
]
if int(debug):
src_files += [
'src/sipcc/sipcc_MTd.lib',
'src/sipcc/sipcc-sample-plugins_MTd.lib',
]
else:
src_files += [
'src/sipcc/sipcc_MT.lib'
'src/sipcc/sipcc-sample-plugins_MT.lib',
]
elif sys.platform =='darwin':
src_files = [
'src/sipcc/libsipcc.a',
'src/sipcc/libsipcc-sample-plugins.a',
'src/libcallcontrol.a',
'src/common/browser_logging/libbrowser_logging.a',
]
elif sys.platform =='linux2':
src_files = [
'src/libcallcontrol.a',
'src/sipcc/libsipcc.a',
'src/sipcc/libsipcc-sample-plugins.a',
'src/common/browser_logging/libbrowser_logging.a',
]
buildResult=env.Library(componentName + suffixName, src_files )
if sys.platform =='win32':
env.Install("./out/lib/", componentName + suffixName + ".lib")
else:
env.Install("./out/lib/", "lib" + componentName + suffixName + ".a")
# function to help write the linux_export directory
def build_export(target, source, env):
if os.path.exists('tmp_linux_libs'):
shutil.rmtree('tmp_linux_libs')
os.mkdir('tmp_linux_libs')
os.system('cp ' + ' '.join(src_files) + ' tmp_linux_libs')
os.system('./combine_libs.sh ' + componentName)
# for linux we need all libraries in one directory for ease of export
if sys.platform=='linux2':
env.AddPostAction(buildResult, build_export)