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 671295f..6cfeb30 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"
     }
   }
 }