summaryrefslogtreecommitdiff
path: root/debian/patches/03_unbundle_vulkan.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/03_unbundle_vulkan.patch')
-rw-r--r--debian/patches/03_unbundle_vulkan.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/patches/03_unbundle_vulkan.patch b/debian/patches/03_unbundle_vulkan.patch
new file mode 100644
index 0000000..33ee7c2
--- /dev/null
+++ b/debian/patches/03_unbundle_vulkan.patch
@@ -0,0 +1,40 @@
+Description: Unbundle Vulkan
+ Use headers from libvulkan-dev and link directly to the library
+ instead of using bundled copy removed from extlibs.
+Author: James Cowgill <jcowgill@debian.org>
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/SFML/Window/CMakeLists.txt
++++ b/src/SFML/Window/CMakeLists.txt
+@@ -306,7 +306,8 @@ if ((NOT BUILD_SHARED_LIBS) AND SFML_OS_
+ endif()
+
+ # Vulkan headers
+-target_include_directories(sfml-window PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/vulkan")
++find_package(Vulkan REQUIRED)
++target_link_libraries(sfml-window PRIVATE Vulkan::Vulkan)
+
+ # CMake 3.11 and later prefer to choose GLVND, but we choose legacy OpenGL for backward compability
+ # (unless the OpenGL_GL_PREFERENCE was explicitly set)
+--- a/src/SFML/Window/Unix/VulkanImplX11.cpp
++++ b/src/SFML/Window/Unix/VulkanImplX11.cpp
+@@ -30,7 +30,7 @@
+ #include <dlfcn.h>
+ #define VK_USE_PLATFORM_XLIB_KHR
+ #define VK_NO_PROTOTYPES
+-#include <vulkan.h>
++#include <vulkan/vulkan.h>
+ #include <string>
+ #include <map>
+ #include <cstring>
+--- a/src/SFML/Window/Win32/VulkanImplWin32.cpp
++++ b/src/SFML/Window/Win32/VulkanImplWin32.cpp
+@@ -32,7 +32,7 @@
+ #include <windows.h>
+ #define VK_USE_PLATFORM_WIN32_KHR
+ #define VK_NO_PROTOTYPES
+-#include <vulkan.h>
++#include <vulkan/vulkan.h>
+ #include <string>
+ #include <map>
+ #include <cstring>