xserver-multidpi/hw/dmx/meson.build
Lyude Paul 4d53e30651 meson: Don't use '' in link_with, ever
String arguments as elements in the array passed to the link_with
argument in meson's executable() functions are not valid and will end up
causing the build file generation to file. This actually ended up
exposing a bug in meson that caused it not to report where in the
meson.build file it was failing:

https://github.com/mesonbuild/meson/pull/2527

The proper way to have a variable that can contain either an empty link
target or an actual link target is:

some_target = []
if some_cond
    some_target = static_library(...)
endif

This way if some_cond is False, some_target gets set to [], gets passed
to executable() in the link_with array, and then gets removed by array
flattening.

This also unbreaks Xwayland builds with -Dglx=false, the thing that
originally made me notice this.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-10-24 10:53:56 -04:00

69 lines
1.2 KiB
Meson

srcs = [
'dmx.c',
'dmxcb.c',
'dmxcmap.c',
'dmxcursor.c',
'dmxdpms.c',
'dmxextension.c',
'dmxfont.c',
'dmxgc.c',
'dmxgcops.c',
'dmxinit.c',
'dmxinput.c',
'dmxlog.c',
'dmxpict.c',
'dmxpixmap.c',
'dmxprop.c',
'dmxscrinit.c',
'dmxstat.c',
'dmxsync.c',
'dmxvisual.c',
'dmxwindow.c',
'../../mi/miinitext.c',
'../../Xext/panoramiX.c',
]
subdir('config')
subdir('input')
subdir('examples')
# XXX: subdir('doc')
# XXX: subdir('doxygen')
# XXX: subdir('man')
dmx_dep = [
common_dep,
dependency('dmxproto', version: '>= 2.2.99.1'),
dependency('xext', version: '>= 1.0.99.4'),
dependency('xau'),
dependency('xmuu'),
dependency('xfixes'),
dependency('xrender'),
dependency('xi', version: '>= 1.2.99.1'),
xdmcp_dep,
dl_dep,
]
dmx_glx = []
if build_glx
srcs += 'dmx_glxvisuals.c'
subdir('glxProxy')
endif
executable(
'Xdmx',
srcs,
include_directories: inc,
dependencies: dmx_dep,
link_with: [
libxserver_main,
libxserver_fb,
libxserver,
libxserver_xkb_stubs,
dmx_input,
dmx_config,
dmx_glx,
],
c_args: '-DHAVE_DMX_CONFIG_H',
install: true,
)