From d19a496bb55b8646e866df8bb07bc6ad3c55eaf2 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 31 May 2018 01:13:49 +0200 Subject: [PATCH] build: fix overriding libdir & includedir Previously, pkgconfig files hard-coded the include and lib directory names, breaking the configuration when they were overridden. --- data/meson.build | 2 ++ data/sysprof-capture.pc.in | 4 ++-- data/sysprof-ui.pc.in | 4 ++-- data/sysprof.pc.in | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/data/meson.build b/data/meson.build index a66b319c..51a5b319 100644 --- a/data/meson.build +++ b/data/meson.build @@ -31,6 +31,8 @@ pkgconf = configuration_data() pkgconf.set('VERSION', meson.project_version()) pkgconf.set('API_VERSION', libsysprof_api_version) pkgconf.set('prefix', get_option('prefix')) +pkgconf.set('libdir', join_paths('${exec_prefix}', get_option('libdir'))) +pkgconf.set('includedir', join_paths('${prefix}', get_option('includedir'))) pkgconfigdir = join_paths(get_option('libdir'), 'pkgconfig') configure_file( diff --git a/data/sysprof-capture.pc.in b/data/sysprof-capture.pc.in index 7f30fbfb..81be6c14 100644 --- a/data/sysprof-capture.pc.in +++ b/data/sysprof-capture.pc.in @@ -1,7 +1,7 @@ prefix=@prefix@ exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${exec_prefix}/include +libdir=@libdir@ +includedir=@includedir@ Name: libsysprof-capture-@API_VERSION@ Description: The sysprof profiler library for reading and writing capture files diff --git a/data/sysprof-ui.pc.in b/data/sysprof-ui.pc.in index e8f9f17e..10ace446 100644 --- a/data/sysprof-ui.pc.in +++ b/data/sysprof-ui.pc.in @@ -1,7 +1,7 @@ prefix=@prefix@ exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${exec_prefix}/include +libdir=@libdir@ +includedir=@includedir@ Name: libsysprof-ui-@API_VERSION@ Description: The sysprof library containing reusable GTK widgets diff --git a/data/sysprof.pc.in b/data/sysprof.pc.in index ebccdad4..527716ab 100644 --- a/data/sysprof.pc.in +++ b/data/sysprof.pc.in @@ -1,7 +1,7 @@ prefix=@prefix@ exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${exec_prefix}/include +libdir=@libdir@ +includedir=@includedir@ Name: libsysprof-@API_VERSION@ Description: The sysprof profiler library