forked from QHedgeTech/cpp-elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSConscript
More file actions
27 lines (19 loc) · 1 KB
/
Copy pathSConscript
File metadata and controls
27 lines (19 loc) · 1 KB
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
import glob
import os
Import('env','mode','compiler', 'project')
localenv = env.Clone()
localenv.Append(CPPPATH=['#src'])
#holds the root of the build directory tree
builddir = '../scons_build/' + project + '/' + compiler + '/' + mode
#holds the path to the executable in the build directory
targetpath = '../bin/' + project + '-' + mode + '-' + compiler
#specify the build directory
localenv.VariantDir(builddir, ".", duplicate=0)
#Build objects
objs = SConscript('../../src/elasticsearch/SConscript', exports = 'localenv', variant_dir=os.path.join(builddir,'elasticsearch'), duplicate=0)
objs.append(SConscript('../../src/json/SConscript', exports = 'localenv', variant_dir=os.path.join(builddir,'json'), duplicate=0))
objs.append(SConscript('../../src/http/SConscript', exports = 'localenv', variant_dir=os.path.join(builddir,'http'), duplicate=0))
srclst = map(lambda x: builddir + '/' + x, glob.glob('*.cpp'))
objs.append(localenv.Object(srclst))
getstarted = localenv.Program(targetpath,objs)
Return('getstarted')