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)') description : 'Enable use of asynchronous swaps (experimental)')
option('internal-debug', type : 'combo', value : 'no', choices : [ 'no', 'sync', 'memory', 'pixmap', 'full' ], option('internal-debug', type : 'combo', value : 'no', choices : [ 'no', 'sync', 'memory', 'pixmap', 'full' ],
description : 'Enable internal debugging') description : 'Enable internal debugging')
option('xorg-module-dir', type : 'string', value : '@libdir@/xorg/modules', option('xorg-module-dir', type: 'string', value: '',
description : 'Default xorg module directory') description: 'Directory to install the driver in [default=from xorg-server pkgconf]')

View File

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