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

Alexandre Julliard julliard at winehq.org
Wed Feb 23 15:59:53 CST 2022


Module: vkd3d
Branch: master
Commit: 02fe9f5bdf5f9268d06da8bbe95f7157cd2be617
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=02fe9f5bdf5f9268d06da8bbe95f7157cd2be617

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Feb 23 17:27:30 2022 +0100

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

Signed-off-by: Alexandre Julliard <julliard at winehq.org>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>

---

 Makefile.am  |  4 ++--
 configure.ac | 11 ++++++++++-
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 8617a09..2425706 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
diff --git a/configure.ac b/configure.ac
index 45220f8..bd58000 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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"])




More information about the wine-cvs mailing list