Change default pkgconfig directory on FreeBSD
FreeBSD uses ${PREFIX}/libdata/pkgconfig as default pkgconf search path
for non-base libraries. This commit makes that directory the default
install_dir in the pkgconfig module on FreeBSD.
@@ -437,6 +437,9 @@ class PkgConfigModule(ExtensionModule):
pcfile = filebase + '.pc'
pkgroot = kwargs.get('install_dir', default_install_dir)
if pkgroot is None:
+ if mesonlib.is_freebsd():
+ pkgroot = os.path.join(state.environment.coredata.get_builtin_option('prefix'), 'libdata', 'pkgconfig')
+ else:
pkgroot = os.path.join(state.environment.coredata.get_builtin_option('libdir'), 'pkgconfig')
if not isinstance(pkgroot, str):
raise mesonlib.MesonException('Install_dir must be a string.')
