Commit 2128efcc authored by Ernestas Kulik's avatar Ernestas Kulik 🦑

nautilus-extension: use Meson to generate pkgconfig file

Currently, the pkgconfig file for nautilus-extension is generated by
substituting variables in a template file. That is prone to mistakes and
requires manual tracking of dependencies. Using the pkgconfig module
from Meson helps automate much of the process.
parent 432f15de
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
extensiondir=@libdir@/nautilus/extensions-3.0
Name: libnautilus-extension
Description: A library to create Nautilus view extensions
Version: @VERSION@
Requires: glib-2.0 gio-2.0 gtk+-3.0
Libs: ${pc_top_builddir}/${pcfiledir}/libnautilus-extension.la
Cflags: -I${pc_top_builddir}/${pcfiledir}/..
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
extensiondir=@libdir@/nautilus/extensions-3.0
Name: libnautilus-extension
Description: A library to create Nautilus view extensions
Version: @VERSION@
Requires: glib-2.0 gio-2.0 gtk+-3.0
Libs: -L${libdir} -lnautilus-extension
Cflags: -I${includedir}/nautilus
......@@ -70,18 +70,24 @@ nautilus_extension = declare_dependency(
include_directories: nautilus_include_dirs
)
pkgconfig_data = configuration_data()
pkgconfig_data.set('prefix', prefix)
pkgconfig_data.set('exec_prefix', '${prefix}')
pkgconfig_data.set('libdir', join_paths('${exec_prefix}', libdir))
pkgconfig_data.set('includedir', join_paths('${prefix}', includedir))
pkgconfig_data.set('extensiondir', join_paths('${exec_prefix}', extensiondir))
pkgconfig_data.set('VERSION', meson.project_version())
configure_file(
input: 'libnautilus-extension.pc.in',
output: 'libnautilus-extension.pc',
configuration: pkgconfig_data,
install_dir: join_paths(libdir, 'pkgconfig')
pkgconfig.generate(
description: 'A library to create Nautilus view extensions',
filebase: 'libnautilus-extension',
libraries: [
libnautilus_extension
],
name: 'libnautilus-extension',
subdirs: [
'nautilus'
],
requires: [
'gio-2.0',
'glib-2.0',
'gtk+-3.0'
],
variables: [
'exec_prefix=${prefix}',
'extensiondir=${libdir}/nautilus/extensions-3.0'
],
version: meson.project_version()
)
......@@ -24,6 +24,7 @@ cc = meson.get_compiler('c')
# Imports
gnome = import('gnome')
i18n = import('i18n')
pkgconfig = import('pkgconfig')
#
# Dependencies
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment