configure: Don't require libxcb to build demos on Mingw.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
This commit is contained in:
Alexandre Julliard 2022-02-23 17:27:30 +01:00
parent 0d777e7fca
commit 02fe9f5bdf
2 changed files with 12 additions and 3 deletions

View File

@ -339,8 +339,8 @@ XFAIL_TESTS = \
endif
if BUILD_DEMOS
DEMOS_LDADD = $(LDADD) libvkd3d-shader.la @XCB_LIBS@ @VULKAN_LIBS@
DEMOS_CFLAGS = $(AM_CFLAGS) @XCB_CFLAGS@
DEMOS_LDADD = $(LDADD) libvkd3d-shader.la @DEMO_LIBS@ @VULKAN_LIBS@
DEMOS_CFLAGS = $(AM_CFLAGS) @DEMO_CFLAGS@
bin_PROGRAMS += $(vkd3d_demos)
demos_vkd3d_gears_SOURCES = demos/gears.c

View File

@ -139,8 +139,17 @@ VKD3D_CHECK_FUNC([HAVE_SYNC_ADD_AND_FETCH], [__sync_add_and_fetch], [__sync_add_
VKD3D_CHECK_FUNC([HAVE_SYNC_SUB_AND_FETCH], [__sync_sub_and_fetch], [__sync_sub_and_fetch((int *)0, 0)])
dnl Makefiles
AS_IF([test "x$enable_demos" = "xyes" -a "x$HAVE_XCB" != "xyes"],
case $host_os in
mingw32*)
AC_SUBST([DEMO_LIBS],["-ld3d12 -ldxgi -lgdi32"])
AC_SUBST([DEMO_CFLAGS],[""])
;;
*) AS_IF([test "x$enable_demos" = "xyes" -a "x$HAVE_XCB" != "xyes"],
[AC_MSG_ERROR([libxcb is required for demos.])])
AC_SUBST([DEMO_LIBS],[$XCB_LIBS])
AC_SUBST([DEMO_CFLAGS],[$XCB_CFLAGS])
;;
esac
AM_CONDITIONAL([BUILD_DEMOS], [test "x$enable_demos" = "xyes"])
AM_CONDITIONAL([BUILD_DOC], [test $DX_FLAG_doc = 1])
AM_CONDITIONAL([BUILD_TESTS], [test "x$enable_tests" != "xno"])