aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2021-03-26 17:48:58 +0100
committerJonas Ådahl <jadahl@gmail.com>2021-03-26 18:12:27 +0100
commit1ad48a50a45b4a4dbc84d9e85ea49311bb864629 (patch)
tree1524e83843d080c0245de78cd94dd75876bd7672
parent5a2611b7adc2782bad5cd1b24467c3b243788968 (diff)
build: Fix wayland-protocols.pc when using autotools
"datadir" is not the same thing in meson and autotools. In autoconf "datadir" is "${datarootdir}", which expands to "${prefix}/share". @datarootdir@ expands to "${prefix}/share". There seems to be no variable that expands to "share". In meson "datadir" is "share". So, avoid the "datadir" variable, just expand "datarootdir" it manually instead. This unbreaks the recently broken autotools setup. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Simon Ser <contact@emersion.fr>
-rw-r--r--meson.build2
-rw-r--r--wayland-protocols.pc.in2
2 files changed, 2 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index e5802dc..1f30157 100644
--- a/meson.build
+++ b/meson.build
@@ -75,7 +75,7 @@ wayland_protocols_srcdir = meson.current_source_dir()
pkgconfig_configuration = configuration_data()
pkgconfig_configuration.set('prefix', get_option('prefix'))
-pkgconfig_configuration.set('datadir', get_option('datadir'))
+pkgconfig_configuration.set('datarootdir', '${prefix}/@0@'.format(get_option('datadir')))
pkgconfig_configuration.set('abs_top_srcdir', wayland_protocols_srcdir)
pkgconfig_configuration.set('PACKAGE', 'wayland-protocols')
pkgconfig_configuration.set('WAYLAND_PROTOCOLS_VERSION', wayland_protocols_version)
diff --git a/wayland-protocols.pc.in b/wayland-protocols.pc.in
index d2dd276..4571fa8 100644
--- a/wayland-protocols.pc.in
+++ b/wayland-protocols.pc.in
@@ -1,5 +1,5 @@
prefix=@prefix@
-datarootdir=${prefix}/@datadir@
+datarootdir=@datarootdir@
pkgdatadir=${pc_sysrootdir}${datarootdir}/@PACKAGE@
Name: Wayland Protocols