forked from mgear-dev/mgear_legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConstruct
57 lines (46 loc) · 1.37 KB
/
SConstruct
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
import excons
import sys
import glob
import excons.tools.maya as maya
platname = {"win32": "windows", "darwin": "osx"}.get(sys.platform, "linux")
outprefix = "platforms/%s/%s/%s/plug-ins" % (maya.Version(nice=True), platname, excons.arch_dir)
defines = []
if sys.platform == "win32":
defines.append("NOMINMAX")
def CVWrapSetup(env):
if sys.platform == "win32":
env.Append(CCFLAGS=["/arch:AVX"])
else:
env.Append(CCFLAGS=["-mavx"])
targets = [
{
"name": "mgear_solvers",
"type": "dynamicmodule",
"prefix": outprefix,
"bldprefix": maya.Version(),
"ext": maya.PluginExt(),
"defs": defines,
"incdirs": ["src"],
"srcs": glob.glob("src/*.cpp"),
"custom": [maya.Require],
"install": {"scripts": glob.glob("scripts/*"),
"": ["mGear.mod"]}
},
{
"name": "cvwrap",
"type": "dynamicmodule",
"prefix": outprefix,
"bldprefix": maya.Version(),
"ext": maya.PluginExt(),
"defs": defines,
"incdirs": ["src"],
"srcs": glob.glob("cvwrap/src/*.cpp"),
"custom": [maya.Require, CVWrapSetup],
"libs": ([] if maya.Version(asString=False) < 201600 else ["clew"]),
"install": {"scripts": glob.glob("cvwrap/scripts/*")}
}
]
maya.SetupMscver()
env = excons.MakeBaseEnv()
excons.DeclareTargets(env, targets)
Default(["mgear_solvers", "cvwrap"])