Generate libvulkan.so.1 on Linux instead of libvulkan.so
authorShahbaz Youssefi <shabbyx@gmail.com>
Fri, 23 Oct 2020 01:48:53 +0000 (21:48 -0400)
committerLenny Komow <lenny@lunarg.com>
Wed, 28 Oct 2020 15:44:21 +0000 (09:44 -0600)
This is the Linux way.  Previously, a copy step was added to copy
libvulkan.so to libvulkan.so.1.  However, that only runs if everything
is built and not when a specific target is built.

There is no need for libvulkan.so on Linux, so this change makes the
libvulkan target directly generate libvulkan.so.1 and removes the copy
step.

BUILD.gn

index 671295fc3752e27024ed9213849db0754af8b3cf..6cfeb30d658cf11c1093b0edbde889bc4e29efff 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -173,14 +173,10 @@ if (!is_android) {
 
       runtime_deps = [ "//sdk/lib/fdio:fdio_sdk" ]
     }
-  }
-
-  if (is_linux && vulkan_loader_shared) {
-    copy("libvulkan-abi1") {
-      sources = [ "${root_out_dir}/libvulkan.so" ]
-      outputs = [ "${root_out_dir}/libvulkan.so.1" ]
 
-      deps = [ ":libvulkan" ]
+    # Create libvulkan.so.1 on Linux instead of libvulkan.so
+    if (is_linux && vulkan_loader_shared) {
+      output_extension = "so.1"
     }
   }
 }