xserver-multidpi/glx/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

56 lines
1.2 KiB
Meson

srcs_glx = [
'indirect_dispatch.c',
'indirect_dispatch_swap.c',
'indirect_reqsize.c',
'indirect_size_get.c',
'indirect_table.c',
'clientinfo.c',
'createcontext.c',
'extension_string.c',
'indirect_util.c',
'indirect_program.c',
'indirect_texture_compression.c',
'glxcmds.c',
'glxcmdsswap.c',
'glxext.c',
'glxdriswrast.c',
'glxdricommon.c',
'glxscreens.c',
'render2.c',
'render2swap.c',
'renderpix.c',
'renderpixswap.c',
'rensize.c',
'single2.c',
'single2swap.c',
'singlepix.c',
'singlepixswap.c',
'singlesize.c',
'swap_interval.c',
'xfont.c',
]
libxserver_glx = []
if build_glx
libxserver_glx = static_library('libxserver_glx',
srcs_glx,
include_directories: inc,
dependencies: [
common_dep,
dl_dep,
dependency('glproto', version: '>= 1.4.17'),
dependency('gl', version: '>= 9.2.0'),
],
c_args: [
glx_align64,
# XXX: generated code includes an unused function
'-Wno-unused-function',
]
)
endif
srcs_glxdri2 = []
if build_dri2 or build_dri3
srcs_glxdri2 = files('glxdri2.c')
endif