summaryrefslogtreecommitdiff
path: root/graphics/vulkan-tools/files/patch-CMakeLists.txt
blob: 15ce58b975b5a70f50439b3d16d336b3faa4eae9 (plain) (blame)
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
CMake Error at cube/CMakeLists.txt:237 (target_link_libraries):
  Target "vkcube" links to:

    volk::volk_headers

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

--- CMakeLists.txt.orig	2024-07-12 20:26:06 UTC
+++ CMakeLists.txt
@@ -56,7 +56,10 @@ find_package(VulkanHeaders QUIET REQUIRED CONFIG)
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 
 find_package(VulkanHeaders QUIET REQUIRED CONFIG)
-find_package(volk QUIET REQUIRED CONFIG)
+find_package(volk QUIET CONFIG)
+if (NOT TARGET volk::volk_headers)
+    add_subdirectory(volk EXCLUDE_FROM_ALL SYSTEM)
+endif()
 if ((APPLE OR BUILD_TESTS) AND NOT ANDROID)
     find_package(VulkanLoader QUIET REQUIRED CONFIG)
 endif()