Skip to content

Commit

Permalink
[SCons] Use options for dynamic linking in generated cantera.pc
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Jul 1, 2023
1 parent 0081d87 commit f0ee780
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
17 changes: 6 additions & 11 deletions platform/posix/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if env['INSTALL_MANPAGES']:

# cantera.pc for use with pkg-config

pc_libs = list(localenv['cantera_libs'])
pc_libs = list(localenv['cantera_shared_libs'])
pc_libdirs = []
pc_incdirs = []
pc_cflags = list(localenv['CXXFLAGS'])
Expand All @@ -22,19 +22,14 @@ if not localenv["package_build"]:
pc_incdirs.extend(localenv["extra_inc_dirs"])
pc_libdirs.extend(localenv["extra_lib_dirs"])

if localenv['system_sundials']:
# Add links to the sundials environment
if localenv["sundials_libdir"] and not localenv["package_build"]:
pc_libdirs.append(localenv['sundials_libdir'])

if localenv["sundials_include"] and not localenv["package_build"]:
if localenv['system_sundials'] and localenv["sundials_include"]:
pc_incdirs.append(localenv['sundials_include'])

if localenv["boost_inc_dir"] and not localenv["package_build"]:
pc_incdirs.append(localenv['boost_inc_dir'])
if localenv["boost_inc_dir"]:
pc_incdirs.append(localenv['boost_inc_dir'])

if localenv["use_hdf5"] and not localenv["package_build"]:
pc_incdirs.append(localenv["hdf_include"])
if localenv["use_hdf5"]:
pc_incdirs.append(localenv["hdf_include"])

if 'Accelerate' in localenv['FRAMEWORKS']:
pc_cflags.append('-framework Accelerate')
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: https://cantera.org
Version: @cantera_version@

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

0 comments on commit f0ee780

Please sign in to comment.