meson: Automatically detect the default xorg-module-dir.

The module directory has changed to a per ABI folder in the xlibre-xserver.
Now the default value of `xorg-module-dir` will be detected from the `moduledir` variable in xorg-server.pc.

Signed-off-by: b-aaz <b-aazbsd.proton.me>
This commit is contained in:
b-aaz
2025-12-04 15:53:13 +03:30
committed by callmetango
parent 91b7822654
commit d4c894c8a6
2 changed files with 6 additions and 10 deletions

View File

@@ -36,5 +36,5 @@ option('async-swap', type : 'boolean', value : false,
description : 'Enable use of asynchronous swaps (experimental)')
option('internal-debug', type : 'combo', value : 'no', choices : [ 'no', 'sync', 'memory', 'pixmap', 'full' ],
description : 'Enable internal debugging')
option('xorg-module-dir', type : 'string', value : '@libdir@/xorg/modules',
description : 'Default xorg module directory')
option('xorg-module-dir', type: 'string', value: '',
description: 'Directory to install the driver in [default=from xorg-server pkgconf]')

View File

@@ -134,13 +134,9 @@ if with_valgrind
endif
xorg_moduledir = get_option('xorg-module-dir')
moduledir = ''
foreach dir : xorg_moduledir.split('/')
if dir == '@libdir@'
dir = get_option('libdir')
endif
moduledir = join_paths(moduledir, dir)
endforeach
if xorg_moduledir == ''
xorg_moduledir = xorg.get_variable(pkgconfig: 'moduledir')
endif
shared_module('intel_drv',
sources : intel_drv_sources,
@@ -152,5 +148,5 @@ shared_module('intel_drv',
'-Wno-sign-compare',
],
name_prefix : '',
install_dir : join_paths(moduledir, 'drivers'),
install_dir : join_paths(xorg_moduledir, 'drivers'),
install : true)