From 49c89ab7a96a2ef5e3200e56d3043372e736e4c9 Mon Sep 17 00:00:00 2001
From: Anders Kaseorg <andersk@mit.edu>
Date: Mon, 11 Jul 2022 13:00:03 -0700
Subject: [PATCH] meson: Fix DEMOS_DATA_DIR when with-system-data-files is
 enabled

DEMOS_DATA_DIR needs to be an absolute path with a trailing slash.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 282c3962..0c15274b 100644
--- a/meson.build
+++ b/meson.build
@@ -29,7 +29,7 @@ null_dep = dependency('', required : false)
 
 demos_data_dir = '../data/'
 if get_option('with-system-data-files')
-  demos_data_dir = get_option('datadir') / 'mesa-demos'
+  demos_data_dir = get_option('prefix') / get_option('datadir') / 'mesa-demos/'
 endif
 add_project_arguments(
   '-DDEMOS_DATA_DIR="@0@"'.format(demos_data_dir),
-- 
2.39.1

