build: Do not link everything with libvulkan.

This commit is contained in:
Józef Kucia 2017-06-15 13:42:54 +02:00
parent a5b78eea21
commit f8c42d3148
2 changed files with 7 additions and 4 deletions

View File

@ -72,7 +72,7 @@ libvkd3d_la_SOURCES = \
libs/vkd3d/vkd3d_main.c \
libs/vkd3d/vkd3d_private.h \
libs/vkd3d/vulkan_procs.h
libvkd3d_la_LIBADD = libvkd3d-common.la @PTHREAD_LIBS@
libvkd3d_la_LIBADD = libvkd3d-common.la @PTHREAD_LIBS@ @VULKAN_LIBS@
libvkd3d_utils_la_SOURCES = \
libs/vkd3d-utils/vkd3d_utils_main.c \

View File

@ -54,10 +54,13 @@ m4_ifdef([PKG_PROG_PKG_CONFIG], [PKG_PROG_PKG_CONFIG], [m4_fatal([pkg-config aut
AC_ARG_VAR([PTHREAD_LIBS], [linker flags for pthreads])
AC_CHECK_LIB([pthread], [pthread_create],
[AC_SUBST(PTHREAD_LIBS, "-lpthread")],
[AC_MSG_ERROR(libpthread not found.)])
[AC_SUBST([PTHREAD_LIBS], ["-lpthread"])],
[AC_MSG_ERROR([libpthread not found.])])
AC_CHECK_LIB([vulkan], [vkGetInstanceProcAddr], [], [AC_MSG_ERROR([libvulkan not found.])])
AC_SUBST([VULKAN_LIBS])
AC_CHECK_LIB([vulkan], [vkGetInstanceProcAddr],
[VULKAN_LIBS="-lvulkan"],
[AC_MSG_ERROR([libvulkan not found.])])
PKG_CHECK_MODULES([XCB], [xcb xcb-keysyms])