Signed-off-by: Chip Davis cdavis@codeweavers.com --- Makefile.am | 4 ++++ configure.ac | 12 ++++++++++++ 2 files changed, 16 insertions(+)
diff --git a/Makefile.am b/Makefile.am index ff7abb0..7723fad 100644 --- a/Makefile.am +++ b/Makefile.am @@ -131,16 +131,20 @@ TESTS = $(vkd3d_tests) $(vkd3d_cross_tests) tests_d3d12_LDADD = $(LDADD) @PTHREAD_LIBS@ tests_vkd3d_api_LDADD = libvkd3d.la @VULKAN_LIBS@
+if BUILD_DEMOS DEMOS_LDADD = $(LDADD) libvkd3d-shader.la @XCB_LIBS@ @VULKAN_LIBS@ DEMOS_CFLAGS = $(AM_CFLAGS) @XCB_CFLAGS@ noinst_PROGRAMS += $(vkd3d_demos) +endif EXTRA_DIST += $(vkd3d_test_headers) $(vkd3d_demos_headers)
+if BUILD_DEMOS demos_gears_CFLAGS = $(DEMOS_CFLAGS) demos_gears_LDADD = $(DEMOS_LDADD) -lm
demos_triangle_CFLAGS = $(DEMOS_CFLAGS) demos_triangle_LDADD = $(DEMOS_LDADD) +endif
VKD3D_V_WIDL = $(vkd3d_v_widl_@AM_V@) vkd3d_v_widl_ = $(vkd3d_v_widl_@AM_DEFAULT_V@) diff --git a/configure.ac b/configure.ac index 2773a15..7c2a560 100644 --- a/configure.ac +++ b/configure.ac @@ -86,6 +86,18 @@ AS_IF([test "x$with_spirv_tools" = "xyes"], HAVE_SPIRV_TOOLS=yes])])
PKG_CHECK_MODULES([XCB], [xcb xcb-keysyms]) +case $host_os in + darwin*|macosx*) + enable_demos_default=no + ;; + *) + enable_demos_default=yes + ;; +esac + +AC_ARG_ENABLE([demos], AS_HELP_STRING([--enable-demos], [Build demo programs]),, + [enable_demos=$enable_demos_default]) +AM_CONDITIONAL(BUILD_DEMOS, [test "x$enable_demos" != "xno"])
dnl Check for functions VKD3D_CHECK_FUNC([HAVE_BUILTIN_CLZ], [__builtin_clz], [__builtin_clz(0)])