build(meson): much more robust build system

This commit is contained in:
2026-06-10 14:28:55 -04:00
parent 1c975a873d
commit d6fff3cdbe
33 changed files with 571 additions and 360 deletions

View File

@@ -0,0 +1,9 @@
prefix=${pcfiledir}/../..
includedir=${prefix}/include
libdir=${prefix}/lib
Name: gridfire
Description: GridFire nuclear reaction network solver (bundled with the gridfire Python wheel)
Version: @VERSION@
Cflags: -I${includedir} -I${includedir}/gridfire/vendor -I${includedir}/fourdst/vendor
Libs: -L${libdir} -lgridfire -Wl,-rpath,${libdir}

View File

@@ -1,22 +1,29 @@
if get_option('pkg_config')
if get_option('build_python')
message('Generating wheel-relocatable pkg-config file for GridFire...')
wheel_pc_conf = configuration_data()
wheel_pc_conf.set('VERSION', meson.project_version())
configure_file(
input: 'gridfire-wheel.pc.in',
output: 'gridfire.pc',
configuration: wheel_pc_conf,
install: true,
install_dir: gridfire_pcdir,
)
elif get_option('pkg_config')
message('Generating pkg-config file for GridFire...')
pkg = import('pkgconfig')
pkg.generate(
libgridfire,
name: 'gridfire',
description: 'GridFire nuclear reaction network solver',
version: meson.project_version(),
libraries: [
libgridfire,
libcomposition,
libconst,
liblogging,
libcppad_static,
libcvode_static,
libkinsol_static
],
subdirs: ['gridfire'],
filebase: 'gridfire',
install_dir: join_paths(get_option('libdir'), 'pkgconfig')
subdirs: ['gridfire'],
requires: [
'fourdst_composition',
'fourdst_config',
'fourdst_constants',
'fourdst_logging',
],
extra_cflags: ['-I${includedir}' / 'gridfire' / 'vendor'],
)
endif