forked from ahmidou/SpliceSoftimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSConscript
More file actions
92 lines (72 loc) · 2.53 KB
/
Copy pathSConscript
File metadata and controls
92 lines (72 loc) · 2.53 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#
# Copyright 2010-2013 Fabric Engine Inc. All rights reserved.
#
import os, sys, platform, copy
Import(
'parentEnv',
'FABRIC_DIR',
'FABRIC_SPLICE_VERSION',
'STAGE_DIR',
'FABRIC_BUILD_OS',
'FABRIC_BUILD_TYPE',
'SOFTIMAGE_INCLUDE_DIR',
'SOFTIMAGE_LIB_DIR',
'SOFTIMAGE_VERSION',
'sharedCapiFlags',
'spliceFlags'
)
env = parentEnv.Clone()
softimageFlags = {
'CPPPATH': [
SOFTIMAGE_INCLUDE_DIR
],
'LIBPATH': [
SOFTIMAGE_LIB_DIR,
],
}
softimageFlags['LIBS'] = ['sicoresdk', 'sicppsdk']
if FABRIC_BUILD_OS == 'Windows':
softimageFlags['CCFLAGS'] = ['/DNT_PLUGIN']
elif FABRIC_BUILD_OS == 'Linux':
softimageFlags['CCFLAGS'] = ['-DLINUX']
env.MergeFlags(softimageFlags)
env.Append(CPPDEFINES = ["_SPLICE_SOFTIMAGE_VERSION="+str(SOFTIMAGE_VERSION[:4])])
env.MergeFlags(sharedCapiFlags)
env.MergeFlags(spliceFlags)
if FABRIC_BUILD_OS == 'Linux':
env.Append(LIBS=['boost_filesystem', 'boost_system'])
target = 'FabricSpliceSoftimage'
softimageModule = env.SharedLibrary(target = target, source = Glob('*.cpp'), SHLIBPREFIX='')
softimageFiles = []
installedModule = env.Install(os.path.join(STAGE_DIR.abspath, 'Application', 'Plugins'), softimageModule)
softimageFiles.append(installedModule)
softimageFiles.append(env.Install(os.path.join(STAGE_DIR.abspath, 'Application', 'UI'), os.path.join('UI', 'FE_logo.bmp')))
softimageFiles.append(env.Install(STAGE_DIR, env.File('license.txt')))
# also install the FabricCore dynamic library
if FABRIC_BUILD_OS == 'Linux':
env.Append(LINKFLAGS = [Literal('-Wl,-rpath,$ORIGIN/../../../../lib/')])
if FABRIC_BUILD_OS == 'Windows':
softimageFiles.append(
env.Install(
os.path.join(STAGE_DIR.abspath, 'Application', 'Plugins'),
env.Glob(os.path.join(FABRIC_DIR, 'bin', '*.dll'))
)
)
softimageFiles.append(
env.Install(
os.path.join(STAGE_DIR.abspath, 'Application', 'Plugins'),
env.File('FabricSplice_Python.py')
)
)
# install PDB files on windows
if FABRIC_BUILD_TYPE == 'Debug' and FABRIC_BUILD_OS == 'Windows':
env['CCPDBFLAGS'] = ['${(PDB and "/Fd%s_incremental.pdb /Zi" % File(PDB)) or ""}']
pdbSource = softimageModule[0].get_abspath().rpartition('.')[0]+".pdb"
pdbTarget = os.path.join(STAGE_DIR.abspath, os.path.split(pdbSource)[1])
copyPdb = env.Command( 'copy', None, 'copy "%s" "%s" /Y' % (pdbSource, pdbTarget) )
env.Depends( copyPdb, installedModule )
env.AlwaysBuild(copyPdb)
# todo: install the python client
alias = env.Alias('splicesoftimage', softimageFiles)
spliceData = (alias, softimageFiles)
Return('spliceData')