test: fix FTBS on missing xlib includes on NetBSD

When X11 isn't installed directly at /usr hierarchy (eg. NetBSD uses
/usr/X11R7/), build breaks:

../test/list.c:31:10: fatal error: X11/Xlib.h: No such file or directory
   31 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~

Needs explicitly dependency on libX11, so the include path is added.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1442>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-03-27 11:41:25 +01:00 committed by Marge Bot
parent 0663bb119a
commit e3d391b9c6
2 changed files with 2 additions and 1 deletions

View File

@ -69,6 +69,7 @@ gbm_req = '>= 10.2'
xf86dgaproto_req = '>= 2.0.99.1' xf86dgaproto_req = '>= 2.0.99.1'
xshmfence_req = '>= 1.1' xshmfence_req = '>= 1.1'
x11_dep = dependency('x11')
xproto_dep = dependency('xproto', version: '>= 7.0.31', fallback: ['xorgproto', 'ext_xorgproto']) xproto_dep = dependency('xproto', version: '>= 7.0.31', fallback: ['xorgproto', 'ext_xorgproto'])
randrproto_dep = dependency('randrproto', version: '>= 1.6.0', fallback: ['xorgproto', 'ext_xorgproto']) randrproto_dep = dependency('randrproto', version: '>= 1.6.0', fallback: ['xorgproto', 'ext_xorgproto'])
renderproto_dep = dependency('renderproto', version: '>= 0.11', fallback: ['xorgproto', 'ext_xorgproto']) renderproto_dep = dependency('renderproto', version: '>= 0.11', fallback: ['xorgproto', 'ext_xorgproto'])

View File

@ -233,7 +233,7 @@ if build_xorg
unit = executable('tests', unit = executable('tests',
unit_sources, unit_sources,
c_args: unit_c_args, c_args: unit_c_args,
dependencies: [pixman_dep, randrproto_dep, inputproto_dep, libxcvt_dep], dependencies: [x11_dep, pixman_dep, randrproto_dep, inputproto_dep, libxcvt_dep],
include_directories: unit_includes, include_directories: unit_includes,
link_args: ldwraps, link_args: ldwraps,
link_with: xorg_link, link_with: xorg_link,