summaryrefslogtreecommitdiff
path: root/debian/patches/03_unbundle_vulkan.patch
blob: 33ee7c20f7bca3fea488981024911e6d8f5993c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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>