[build] remove hard coded path issue in SConscript

This commit is contained in:
Bernard Xiong
2016-05-10 09:34:05 +08:00
parent 7c38c59f62
commit b46ebbf56d
4 changed files with 9 additions and 12 deletions
+2 -4
View File
@@ -1,11 +1,9 @@
Import('RTT_ROOT')
Import('rtconfig')
from building import *
import os
CAIRO_VERSION = '1.10.2'
CAIRO_PATH = 'cairo-' + CAIRO_VERSION
cwd = GetCurrentDir()
if GetDepend('RT_USING_CAIRO') and not os.path.exists(CAIRO_PATH):
print '================ERROR============================'
@@ -99,7 +97,7 @@ cairo.c
for item in range(len(src)):
src[item] = CAIRO_PATH + '/src/' + src[item]
CPPPATH = [RTT_ROOT + '/components/external/cairo/' + CAIRO_PATH + '/src', RTT_ROOT + '/components/external/cairo/']
CPPPATH = [cwd + '/' + CAIRO_PATH + '/src', cwd]
group = DefineGroup('cairo', src, depend = ['RT_USING_CAIRO', 'RT_USING_NEWLIB', 'RTGUI_IMAGE_PNG', 'RT_USING_PTHREADS'], CPPPATH = CPPPATH)
Return('group')
+2 -3
View File
@@ -1,12 +1,11 @@
Import('RTT_ROOT')
Import('rtconfig')
from building import *
cwd = GetCurrentDir()
src = Split('''
minilzo.c
lzo.c
''')
CPPPATH = [RTT_ROOT + '/components/external/lzo']
CPPPATH = [cwd]
group = DefineGroup('lzo', src, depend = ['RT_USING_LZO'], CPPPATH = CPPPATH)
+2 -3
View File
@@ -1,13 +1,12 @@
Import('RTT_ROOT')
Import('rtconfig')
from building import *
cwd = GetCurrentDir()
src = Split('''
pb_common.c
pb_decode.c
pb_encode.c
''')
CPPPATH = [RTT_ROOT + '/components/external/nanopb']
CPPPATH = [cwd]
group = DefineGroup('Nanopb', src, depend = ['RT_USING_NANOPB'], CPPPATH = CPPPATH)