1 |
Import('*') |
2 |
|
3 |
local_env=env.Copy() |
4 |
|
5 |
src_dir = local_env.Dir('.').srcnode().abspath |
6 |
|
7 |
import os |
8 |
filenames = os.listdir(src_dir) |
9 |
sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']] |
10 |
headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']] |
11 |
# Filter out sources that should not be in the list automatically |
12 |
|
13 |
lib_name = 'escriptcpp' |
14 |
|
15 |
local_env.Append(LIBS = [boost_lib, 'esysUtils', ]) |
16 |
|
17 |
lib = local_env.SharedLibrary(lib_name, sources) |
18 |
|
19 |
include_path = Dir(lib_name, incinstall) |
20 |
|
21 |
local_env.Install(include_path, headers ) |
22 |
local_env.Install(libinstall, lib) |
23 |
|
24 |
# Call the unit tests SConscript |
25 |
# export the lib target since tests will depend on it |
26 |
# the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb) |
27 |
# FIXME: This list handling produces the desired result but can this be done directly with scons File nodes? |
28 |
|
29 |
dep_lib = [libinstall+'/'+str(x) for x in lib] |
30 |
Export('dep_lib') |
31 |
|
32 |
local_env.SConscript(dirs = ['#/escript/test'], build_dir='#/build/$PLATFORM/escript/test', duplicate=0) |