1 |
Import('env') |
2 |
|
3 |
if env.get('WITH_IPOPT'): |
4 |
solver_env = env.Clone() |
5 |
|
6 |
solver_env.AppendUnique(CPPPATH=[solver_env.get('IPOPT_CPPPATH')]) |
7 |
|
8 |
solver_env.Append( |
9 |
CPPDEFINES=[ |
10 |
'ASC_WITH_IPOPT' |
11 |
] |
12 |
,CPPPATH = [solver_env.get('IPOPT_CPPPATH')] |
13 |
) |
14 |
|
15 |
lib = solver_env.SharedLibrary("ipopt",["asc_ipopt.c"] |
16 |
,LIBS = ['ascend'] + solver_env.get('IPOPT_LIBS') |
17 |
,LIBPATH = ['#'] + [solver_env.get('IPOPT_LIBPATH')] |
18 |
,SHLIBSUFFIX = env['EXTLIB_SUFFIX'] |
19 |
,SHLIBPREFIX = env['EXTLIB_PREFIX'] |
20 |
) |
21 |
|
22 |
env.Depends(lib,env['libascend']) |
23 |
|
24 |
env['extfns'] += [lib] |
25 |
|
26 |
if env.get('CAN_INSTALL'): |
27 |
dir = Dir(env.subst("$INSTALL_ROOT$INSTALL_SOLVERS")) |
28 |
env.InstallShared(dir,lib) |
29 |
|
30 |
# vim: set syntax=python: |