如何从SCons中删除特定的文件
关键一点就在于记住python中的返回类型为list.
#
Grab all *.cpp or *.cxx files in current directory and store all the *.cpp/*.cxx info in GfxSrc
VDGLSrc
=
VDGLenv.Glob(
'
*.cpp
'
)
if
OS
==
'
windows
'
: VDGLSrc.extend(VDGLenv.Glob(
'
./win/*.cpp
'
))
if
buildMode
==
'
debug
'
: VDGLenv.Append(LIBS
=
[
'
kCg
'
,
'
OGSObjects
'
,
'
OGSDevices
'
,
'
OpenGL32
'
,
'
cg_d
'
,
'
cgGL_d
'
])
elif
buildMode
==
'
release
'
: VDGLenv.Append(LIBS
=
[
'
kCg
'
,
'
OGSObjects
'
,
'
OGSDevices
'
,
'
OpenGL32
'
,
'
cg
'
,
'
cgGL
'
])
elif
OS
==
'
darwin
'
: VDGLSrc.extend(VDGLenv.Glob(
'
./macos/*.cpp
'
))
#
Exclude ModuleGL.cpp and nv_dds.cpp in VDGLSrc
VDGLRm1 = VDGLenv.Glob('./ModuleGL.cpp')
VDGLSrc.remove(VDGLRm1[0])
VDGLRm1
=
VDGLenv.Glob(
'
./nv_dds.cpp
'
) VDGLSrc.remove(VDGLRm1[0])
if
buildMode
==
'
debug
'
: VDGLenv.Append(LIBS
=
[
'
kCg_d
'
,
'
OGSObjects_d
'
,
'
OGSDevices_d
'
,
'
tbb_debug
'
])
elif
buildMode
==
'
release
'
: VDGLenv.Append(LIBS
=
[
'
kCg
'
,
'
OGSObjects
'
,
'
OGSDevices
'
,
'
tbb
'
])
elif
OS
==
'
linux
'
: VDGLSrc.extend(VDGLenv.Glob(
'
./unix/*.cpp
'
))
转载于:https://www.cnblogs.com/SunWentao/archive/2008/08/29/1279472.html
原文链接:https://blog.csdn.net/weixin_30342827/article/details/96783564
本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。
还没有人抢沙发呢~