build: Use shared SPIRV-Tools library.

SPIRV-Tools are now also built as a shared library.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2018-02-07 21:27:11 +01:00 committed by Alexandre Julliard
parent 70493640e3
commit 389c18272f
2 changed files with 5 additions and 12 deletions

View File

@ -70,6 +70,7 @@ libvkd3d_shader_la_SOURCES = \
libs/vkd3d-shader/vkd3d_shader.map \
libs/vkd3d-shader/vkd3d_shader_main.c \
libs/vkd3d-shader/vkd3d_shader_private.h
libvkd3d_shader_la_CFLAGS = @SPIRV_TOOLS_CFLAGS@
libvkd3d_shader_la_LIBADD = @SPIRV_TOOLS_LIBS@
if HAVE_LD_VERSION_SCRIPT
libvkd3d_shader_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libs/vkd3d-shader/vkd3d_shader.map

View File

@ -54,9 +54,6 @@ AS_IF([test "x$ac_cv_header_vulkan_vulkan_h" != "xyes"], [AC_MSG_ERROR([vulkan.h
AS_IF([test "x$ac_cv_header_spirv_1_0_spirv_h" != "xyes"], [AC_MSG_ERROR([spirv.h not found.])])
AS_IF([test "x$ac_cv_header_spirv_1_0_GLSL_std_450_h" != "xyes"], [AC_MSG_ERROR([GLSL.std.450.h not found.])])
AS_IF([test "x$with_spirv_tools" = "xyes"],
[AC_CHECK_HEADERS([spirv-tools/libspirv.h], [], [AC_MSG_ERROR([spirv-tools/libspirv.h not found.])])])
dnl Check for libraries
m4_ifdef([PKG_PROG_PKG_CONFIG], [PKG_PROG_PKG_CONFIG], [m4_fatal([pkg-config autoconf macros not found.])])
@ -77,11 +74,11 @@ AC_CHECK_LIB([vulkan], [vkGetInstanceProcAddr],
[VULKAN_LIBS="-lvulkan"],
[AC_MSG_ERROR([libvulkan not found.])])
AC_SUBST([SPIRV_TOOLS_LIBS])
HAVE_SPIRV_TOOLS=no
AS_IF([test "x$with_spirv_tools" = "xyes"],
[AC_CHECK_LIB([SPIRV-Tools], [spvTextToBinary],
[SPIRV_TOOLS_LIBS="-lstdc++ -lSPIRV-Tools"],
[AC_MSG_ERROR([libSPIRV-Tools not found.])], [-lstdc++])])
[PKG_CHECK_MODULES([SPIRV_TOOLS], [SPIRV-Tools-shared],
[AC_DEFINE([HAVE_SPIRV_TOOLS], [1], [Define to 1 if you have SPIRV-Tools.])
HAVE_SPIRV_TOOLS=yes])])
PKG_CHECK_MODULES([XCB], [xcb xcb-keysyms])
@ -94,11 +91,6 @@ VKD3D_CHECK_FUNC([HAVE_SYNC_SUB_AND_FETCH], [__sync_sub_and_fetch], [__sync_sub_
AM_CONDITIONAL([HAS_CROSSTARGET32], [test "x$CROSSTARGET32" != "xno"])
AM_CONDITIONAL([HAS_CROSSTARGET64], [test "x$CROSSTARGET64" != "xno"])
AS_IF([test "x$ac_cv_header_spirv_tools_libspirv_h" = "xyes" -a "x$ac_cv_lib_SPIRV_Tools_spvTextToBinary" = "xyes"],
[AC_DEFINE([HAVE_SPIRV_TOOLS], [1], [Define to 1 if you have SPIRV-Tools.])
HAVE_SPIRV_TOOLS=yes],
[HAVE_SPIRV_TOOLS=no])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT