1 |
######################################################## |
2 |
# |
3 |
# Copyright (c) 2003-2009 by University of Queensland |
4 |
# Earth Systems Science Computational Center (ESSCC) |
5 |
# http://www.uq.edu.au/esscc |
6 |
# |
7 |
# Primary Business: Queensland, Australia |
8 |
# Licensed under the Open Software License version 3.0 |
9 |
# http://www.opensource.org/licenses/osl-3.0.php |
10 |
# |
11 |
######################################################## |
12 |
|
13 |
|
14 |
import os |
15 |
Import('*') |
16 |
|
17 |
local_env = clone_env(env_mpi) |
18 |
|
19 |
sources = """ |
20 |
DataVar.cpp |
21 |
ElementData.cpp |
22 |
EscriptDataset.cpp |
23 |
FinleyMesh.cpp |
24 |
NodeData.cpp |
25 |
""".split() |
26 |
headers = """ |
27 |
DataVar.h |
28 |
ElementData.h |
29 |
EscriptDataset.h |
30 |
escriptexport.h |
31 |
FinleyMesh.h |
32 |
NodeData.h |
33 |
""".split() |
34 |
|
35 |
local_env.AppendUnique(LIBS = [ 'finley' ] + env['sys_libs'] + env['silo_libs']) |
36 |
|
37 |
if IS_WINDOWS_PLATFORM : |
38 |
local_env.Append(CPPDEFINES = ['ESCRIPTEXPORT_EXPORTS']) |
39 |
|
40 |
module_name = 'escriptexport' |
41 |
|
42 |
lib = local_env.SharedLibrary(module_name, sources) |
43 |
env.Alias('target_escriptexport_so', lib) |
44 |
|
45 |
include_path = Dir('escriptexport', local_env['incinstall']) |
46 |
|
47 |
tmp1 = local_env.Install(include_path, headers) |
48 |
env.Alias('target_install_escriptexport_headers', [tmp1]) |
49 |
|
50 |
tmp3 = local_env.Install(local_env['libinstall'], lib) |
51 |
env.Alias('target_install_escriptexport_so', tmp3) |
52 |
|
53 |
# export the lib target since tests will depend on it |
54 |
# the lib target is a list of file nodes (why? win32 produces more than one |
55 |
# output file: .lib, .dll, .pdb) |
56 |
# FIXME: This list handling produces the desired result but can this be done |
57 |
# directly with scons File nodes? |
58 |
dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib] |
59 |
Export('dep_lib') |
60 |
|
61 |
# Call the unit tests SConscript |
62 |
#local_env.SConscript(dirs = ['#/dataexporter/test'], build_dir='#/build/$PLATFORM/dataexporter/test', duplicate=0) |
63 |
|