Skip to content

Commit 180d5c4

Browse files
committed
[SCons] Fixed generation of library list in cantera.pc
Now includes cvode, sundials, ctlapack, etc. as necessary depending on the SCons options specified.
1 parent 53891d0 commit 180d5c4

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

platform/posix/SConscript

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@ if env['python_package'] == 'full':
2424
# Cantera.mak include file for Makefile projects
2525
# cantera.pc for use with pkg-config
2626

27-
pc_libs = []
27+
pc_libs = list(localenv['cantera_libs'])
2828
pc_libdirs = []
2929
pc_incdirs = []
3030
pc_cflags = []
3131

3232
localenv['mak_corelibs'] = '-lcantera'
3333
if not env['single_library']:
3434
localenv['mak_corelibs'] += ' -lctmath -lexecstream'
35-
pc_libs.append('execstream')
3635

3736
if env['use_sundials'] == 'n':
3837
localenv['mak_sundials_libs'] = '-lcvode'
@@ -42,7 +41,6 @@ else:
4241
# Add links to the sundials environment
4342
localenv['mak_sundials_libs'] = ' '.join('-l%s' % s
4443
for s in localenv['sundials_libs'])
45-
pc_libs += localenv['sundials_libs']
4644
if localenv['sundials_libdir']:
4745
localenv['mak_sundials_libdir'] = '-L' + localenv['sundials_libdir']
4846
pc_libdirs.append(localenv['sundials_libdir'])
@@ -75,7 +73,6 @@ localenv['mak_have_blas_lapack_dir'] = '1' if localenv['blas_lapack_dir'] else '
7573

7674
if localenv['blas_lapack_dir']:
7775
localenv['mak_blas_lapack_libs'] = ' '.join('-l%s' % s for s in localenv['blas_lapack_libs'])
78-
pc_libs += localenv['blas_lapack_libs']
7976
elif not env['single_library']:
8077
localenv['mak_blas_lapack_libs'] = ('-L' + '$inst_libdir' + ' -lctlapack -lctblas')
8178
else:

platform/posix/cantera.pc.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ Description: Cantera library
88
URL: http://cantera.googlecode.com
99
Version: @cantera_version@
1010

11-
Libs: -L${libdir} @pc_libdirs@ -lcantera @pc_libs@
11+
Libs: -L${libdir} @pc_libdirs@ @pc_libs@
1212
Cflags: @pc_cflags@ -I${includedir} @pc_incdirs@

0 commit comments

Comments
 (0)