Add support for building on ChromeOS
authorAlexis Hetu <sugoi@google.com>
Tue, 25 Jan 2022 15:09:00 +0000 (10:09 -0500)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Tue, 25 Jan 2022 16:59:13 +0000 (09:59 -0700)
BUILD.gn

index 29d5dead185b0452276bf996152e24035a0b8a9c..08df4aef2ba7f3182638eb8944aa044a37fb56b0 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -57,7 +57,7 @@ config("vulkan_internal_config") {
       "EXTRASYSCONFDIR=\"/pkg/data\"",
     ]
   }
-  if (is_linux || is_mac) {
+  if (is_linux || is_chromeos || is_mac) {
     defines += [
       "SYSCONFDIR=\"/etc\"",
       "FALLBACK_CONFIG_DIRS=\"/etc/xdg\"",
@@ -82,7 +82,7 @@ config("vulkan_loader_config") {
   if (is_win) {
     cflags = [ "/wd4201" ]
   }
-  if (is_linux) {
+  if (is_linux || is_chromeos) {
     # assume secure_getenv() is available
     defines += [ "HAVE_SECURE_GETENV" ]
   }
@@ -145,7 +145,7 @@ if (!is_android) {
         output_name = "vulkan"
 
         # Create libvulkan.so.1 on Linux instead of libvulkan.so
-        if (is_linux && vulkan_loader_shared) {
+        if ((is_linux || is_chromeos) && vulkan_loader_shared) {
           output_extension = "so.1"
         }
       }
@@ -181,7 +181,7 @@ if (!is_android) {
       }
       libs = [ "Cfgmgr32.lib" ]
     }
-    if (is_linux) {
+    if (is_linux || is_chromeos) {
       sources += [
         "loader/loader_linux.c",
         "loader/loader_linux.h",