[sconscript] application文件夹增加工程文件路径向下扫描功能
用户在加入自己的工程文件夹时,只要该文件内含有Sconscript,就可以被自动探测到,无需手动修改application下的sconscript手动添加。
This commit is contained in:
parent
74064e8cc7
commit
71a5385a97
|
@ -1,4 +1,5 @@
|
|||
import rtconfig
|
||||
import os
|
||||
from building import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
|
@ -9,4 +10,10 @@ main.c
|
|||
|
||||
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
list = os.listdir(cwd)
|
||||
for d in list:
|
||||
path = os.path.join(cwd, d)
|
||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||
group = group + SConscript(os.path.join(d, 'SConscript'))
|
||||
|
||||
Return('group')
|
||||
|
|
Loading…
Reference in New Issue