From: Thierry Reding <tred...@nvidia.com>

Meson stores relative paths for includedir, libdir and friends. These
have to be concatenated with the ${prefix} or ${exec_prefix} variables
to create a working pkg-config file.

While at it, set a default value for the module_dir option so that it
points to the same location as used in the autotools-based build.

Signed-off-by: Thierry Reding <tred...@nvidia.com>
---
 meson.build       | 14 +++++++-------
 meson_options.txt |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/meson.build b/meson.build
index b1af0a3debc5..cb819b27aedf 100644
--- a/meson.build
+++ b/meson.build
@@ -591,13 +591,13 @@ if build_xorg
     awk = find_program('awk')
 
     sdkconfig.set('prefix', get_option('prefix'))
-    sdkconfig.set('exec_prefix', get_option('prefix'))
-    sdkconfig.set('libdir', get_option('libdir'))
-    sdkconfig.set('includedir', get_option('includedir'))
-    sdkconfig.set('datarootdir', get_option('datadir'))
-    sdkconfig.set('moduledir', get_option('module_dir'))
-    sdkconfig.set('sdkdir', join_paths(get_option('includedir'), 'include'))
-    sdkconfig.set('sysconfigdir', join_paths(get_option('datadir'), 
'X11/xorg.conf.d'))
+    sdkconfig.set('exec_prefix', '${prefix}')
+    sdkconfig.set('libdir', join_paths('${exec_prefix}', get_option('libdir')))
+    sdkconfig.set('includedir', join_paths('${prefix}', 
get_option('includedir')))
+    sdkconfig.set('datarootdir', join_paths('${prefix}', 
get_option('datadir')))
+    sdkconfig.set('moduledir', join_paths('${exec_prefix}', 
get_option('module_dir')))
+    sdkconfig.set('sdkdir', join_paths('${prefix}', get_option('includedir'), 
'xorg'))
+    sdkconfig.set('sysconfigdir', join_paths('${datarootdir}', 
'X11/xorg.conf.d'))
 
     sdkconfig.set('abi_ansic',
         run_command(awk, '-F', '[(,)]',
diff --git a/meson_options.txt b/meson_options.txt
index ce1ae80bd43a..5c7be0e26ce5 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -19,7 +19,7 @@ option('builder_addr', type: 'string', description: 'Builder 
address', value: 'x
 option('builder_string', type: 'string', description: 'Additional builder 
string')
 
 option('log_dir', type: 'string')
-option('module_dir', type: 'string',
+option('module_dir', type: 'string', value: 'xorg/modules',
        description: 'X.Org modules directory')
 option('default_font_path', type: 'string')
 
-- 
2.16.3

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to