[sysprof: 1/2] build: fix overriding libdir & includedir



commit d19a496bb55b8646e866df8bb07bc6ad3c55eaf2
Author: Jan Tojnar <jtojnar gmail com>
Date:   Thu May 31 01:13:49 2018 +0200

    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 a66b319..51a5b31 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 7f30fbf..81be6c1 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 e8f9f17..10ace44 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 ebccdad..527716a 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]