-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSConscript
More file actions
36 lines (27 loc) · 760 Bytes
/
SConscript
File metadata and controls
36 lines (27 loc) · 760 Bytes
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
from building import *
import os
import sys
#默认不启用此组件
Enable_HCPPBox=False
if "Enable_HCPPBox" in Env:
Enable_HCPPBox=True
if "Enable_HCPPBox" in os.environ:
Enable_HCPPBox=True
if not Enable_HCPPBox:
group = []
Return('group')
cwd = GetCurrentDir()
src = Glob('*.c')
src += Glob('*.cpp')
CPPPATH = [
cwd,
]
LIBS=[]
if sys.platform.startswith("win32") or sys.platform.startswith("cygwin"):
LIBS += ["ws2_32"]
group = DefineGroup('HCPPBox', src, depend = [''], CPPPATH = CPPPATH,LIBS=LIBS)
list = os.listdir(cwd)
for item in list:
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
group = group + SConscript(os.path.join(item, 'SConscript'))
Return('group')