From 340c4080d668ed31b362add38316ea927c5d7e28 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Mon, 4 Nov 2019 19:55:23 +0000
Subject: [PATCH] build: Factor out common installation path for helpers

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 helpers/meson.build | 15 +++------------
 meson.build         |  5 +++++
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/helpers/meson.build b/helpers/meson.build
index bda568148..3c37a53a0 100644
--- a/helpers/meson.build
+++ b/helpers/meson.build
@@ -25,10 +25,7 @@ executable(
   multiarch + '-true',
   'true.c',
   install : true,
-  install_dir : join_paths(
-    get_option('libexecdir'),
-    'steam-runtime-tools-' + api_major,
-  )
+  install_dir : pkglibexecdir,
 )
 
 executable(
@@ -37,10 +34,7 @@ executable(
   include_directories : project_include_dirs,
   dependencies : [json_glib, glib],
   install : true,
-  install_dir : join_paths(
-    get_option('libexecdir'),
-    'steam-runtime-tools-' + api_major,
-  )
+  install_dir : pkglibexecdir,
 )
 
 executable(
@@ -48,10 +42,7 @@ executable(
   'inspect-library.c',
   dependencies : [libdl],
   install : true,
-  install_dir : join_paths(
-    get_option('libexecdir'),
-    'steam-runtime-tools-' + api_major,
-  )
+  install_dir : pkglibexecdir,
 )
 
 executable(
diff --git a/meson.build b/meson.build
index 8f64fa14b..55ca00642 100644
--- a/meson.build
+++ b/meson.build
@@ -150,6 +150,11 @@ libdl = c_compiler.find_library('dl', required : false)
 
 project_include_dirs = include_directories('.')
 
+pkglibexecdir = join_paths(
+  get_option('libexecdir'),
+  'steam-runtime-tools-' + api_major,
+)
+
 if host_machine.cpu_family() == 'x86_64'
   multiarch = 'x86_64-linux-gnu'
 elif host_machine.cpu_family() == 'x86'
-- 
GitLab