Skip to content

Commit

Permalink
[SCons] Fixed generation of library list in cantera.pc
Browse files Browse the repository at this point in the history
Now includes cvode, sundials, ctlapack, etc. as necessary depending on the SCons
options specified.
  • Loading branch information
speth committed Dec 12, 2012
1 parent 53891d0 commit 180d5c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions platform/posix/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ if env['python_package'] == 'full':
# Cantera.mak include file for Makefile projects
# cantera.pc for use with pkg-config

pc_libs = []
pc_libs = list(localenv['cantera_libs'])
pc_libdirs = []
pc_incdirs = []
pc_cflags = []

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

if env['use_sundials'] == 'n':
localenv['mak_sundials_libs'] = '-lcvode'
Expand All @@ -42,7 +41,6 @@ else:
# Add links to the sundials environment
localenv['mak_sundials_libs'] = ' '.join('-l%s' % s
for s in localenv['sundials_libs'])
pc_libs += localenv['sundials_libs']
if localenv['sundials_libdir']:
localenv['mak_sundials_libdir'] = '-L' + localenv['sundials_libdir']
pc_libdirs.append(localenv['sundials_libdir'])
Expand Down Expand Up @@ -75,7 +73,6 @@ localenv['mak_have_blas_lapack_dir'] = '1' if localenv['blas_lapack_dir'] else '

if localenv['blas_lapack_dir']:
localenv['mak_blas_lapack_libs'] = ' '.join('-l%s' % s for s in localenv['blas_lapack_libs'])
pc_libs += localenv['blas_lapack_libs']
elif not env['single_library']:
localenv['mak_blas_lapack_libs'] = ('-L' + '$inst_libdir' + ' -lctlapack -lctblas')
else:
Expand Down
2 changes: 1 addition & 1 deletion platform/posix/cantera.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Description: Cantera library
URL: http://cantera.googlecode.com
Version: @cantera_version@

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

0 comments on commit 180d5c4

Please sign in to comment.