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 <[email protected]> --- hw/xfree86/dixmods/meson.build | 5 ++++- hw/xfree86/exa/meson.build | 2 +- hw/xfree86/fbdevhw/meson.build | 1 + hw/xfree86/meson.build | 3 ++- hw/xfree86/shadowfb/meson.build | 1 + meson.build | 2 +- 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/dixmods/meson.build b/hw/xfree86/dixmods/meson.build index 06ca56862..835d23215 100644 --- a/hw/xfree86/dixmods/meson.build +++ b/hw/xfree86/dixmods/meson.build @@ -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') diff --git a/hw/xfree86/exa/meson.build b/hw/xfree86/exa/meson.build index bfc5590f8..5f5cf08a7 100644 --- a/hw/xfree86/exa/meson.build +++ b/hw/xfree86/exa/meson.build @@ -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, diff --git a/hw/xfree86/fbdevhw/meson.build b/hw/xfree86/fbdevhw/meson.build index 2f82e2d9f..35d66ef2c 100644 --- a/hw/xfree86/fbdevhw/meson.build +++ b/hw/xfree86/fbdevhw/meson.build @@ -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) diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build index 3c5f46f0b..3b1aa17ff 100644 --- a/hw/xfree86/meson.build +++ b/hw/xfree86/meson.build @@ -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 diff --git a/hw/xfree86/shadowfb/meson.build b/hw/xfree86/shadowfb/meson.build index 0470ecbb5..7ecc9bc30 100644 --- a/hw/xfree86/shadowfb/meson.build +++ b/hw/xfree86/shadowfb/meson.build @@ -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) diff --git a/meson.build b/meson.build index d71cfed5a..123be7f8c 100644 --- a/meson.build +++ b/meson.build @@ -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') -- 2.14.2 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
