meson: Fix linkage of loadable modules for PE/COFF

For the loadable modules it makes sense to build for PE/COFF targets, link
those loadable modules with the import library for the Xorg executable, so
that symbols provided by the executable can be satisfied at link time (as
required by PE/COFF).

Since this uses the syntax of using the returned build target object from an
executable() with an implib: kwarg to link_with:, introduced in meson 0.42
and a syntax error with older meson, also update the minimum meson version
which we require in project() to that.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
This commit is contained in:
Jon Turney 2017-10-10 14:28:33 +01:00 committed by Adam Jackson
parent d43b1ca852
commit a10b4fcdc0
6 changed files with 10 additions and 4 deletions

View File

@ -6,6 +6,7 @@ fb = shared_module(
c_args: xorg_c_args,
dependencies: common_dep,
link_whole: libxserver_fb,
link_with: e,
install: true,
install_dir: module_dir,
@ -19,6 +20,7 @@ shared_module(
c_args: [ xorg_c_args, wfb_args ],
dependencies: common_dep,
link_whole: libxserver_wfb,
link_with: e,
install: true,
install_dir: module_dir,
@ -32,7 +34,7 @@ shared_module(
c_args: xorg_c_args,
dependencies: common_dep,
link_whole: libxserver_miext_shadow,
link_with: fb,
link_with: [fb, e],
install: true,
install_dir: module_dir,
@ -47,6 +49,7 @@ if build_glx
c_args: [ xorg_c_args, glx_align64 ],
dependencies: [ common_dep, dl_dep ],
link_whole: libxserver_glx,
link_with: e,
install: true,
install_dir: join_paths(module_dir, 'extensions')

View File

@ -2,7 +2,7 @@ xorg_exa = shared_module('exa',
'examodule.c',
include_directories: [inc, xorg_inc],
dependencies: common_dep,
link_with: libxserver_exa,
link_with: [libxserver_exa, e],
c_args: xorg_c_args,
install: true,
install_dir: module_dir,

View File

@ -11,6 +11,7 @@ shared_module('fbdevhw',
c_args: xorg_c_args,
install: true,
install_dir: module_dir,
link_with: e,
)
install_data('fbdevhw.h', install_dir: xorgsdkdir)

View File

@ -91,7 +91,7 @@ xorg_deps = [
libdrm_dep,
]
executable(
e = executable(
'Xorg',
srcs_xorg,
include_directories: [inc, xorg_inc],
@ -100,6 +100,7 @@ executable(
link_args: linker_export_flags,
c_args: xorg_c_args,
install: true,
implib: true,
)
# subdirs for modules loadable by Xorg

View File

@ -5,6 +5,7 @@ shared_module('shadowfb',
c_args: xorg_c_args,
install: true,
install_dir: module_dir,
link_with: e,
)
install_data('shadowfb.h', install_dir: xorgsdkdir)

View File

@ -4,7 +4,7 @@ project('xserver', 'c',
'c_std=gnu99',
],
version: '1.19.99.1',
meson_version: '>= 0.40.0',
meson_version: '>= 0.42.0',
)
add_project_arguments('-DHAVE_DIX_CONFIG_H', language: 'c')
cc = meson.get_compiler('c')