[build] Copy BUILD.gn from //build/secondary

As part of soft transition to updating glfw to version 3.3,
copy //build/secondary/third_party/glfw/BUILD.gn so it is colocated
with the source and can atomically be revved when we update to 3.3.

BLD-564 #comment

Change-Id: I56bb98950b5e7697a8bd4587ad4b268400b475eb
diff --git a/BUILD.gn b/BUILD.gn
new file mode 100644
index 0000000..81a74fa
--- /dev/null
+++ b/BUILD.gn
@@ -0,0 +1,74 @@
+# Copyright 2017 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+config("glfw_config") {
+  include_dirs = [
+    "include",
+    "deps",
+  ]
+  cflags = [
+    "-Wall",
+    "-Wno-deprecated",
+  ]
+
+  # add flags to avoid compiler warnings
+  cflags += [
+    "-Wno-int-conversion",
+    "-Wno-implicit-function-declaration",
+    "-Wno-sign-compare",
+  ]
+}
+static_library("glfw") {
+  defines = [
+    "_GLFW_BUILD_DLL",
+    "__GLFW_USE_HYBRID_HPG",
+  ]
+  sources = [
+    "deps/getopt.c",
+    "deps/glad.c",
+    "src/context.c",
+    "src/init.c",
+    "src/input.c",
+    "src/monitor.c",
+    "src/vulkan.c",
+    "src/window.c",
+  ]
+  if (is_mac) {
+    defines += [
+      "_GLFW_COCOA",
+      "_GLFW_USE_RETINA",
+    ]
+    libs = [
+      "Cocoa.framework",
+      "CoreFoundation.framework",
+      "CoreGraphics.framework",
+      "CoreVideo.framework",
+      "IOKit.framework",
+      "OpenGL.framework",
+    ]
+    sources += [
+      "src/cocoa_init.m",
+      "src/cocoa_joystick.m",
+      "src/cocoa_monitor.m",
+      "src/cocoa_time.c",
+      "src/cocoa_window.m",
+      "src/nsgl_context.m",
+      "src/posix_tls.c",
+    ]
+  } else if (is_linux) {
+    defines += [ "_GLFW_X11" ]
+    sources += [
+      "src/egl_context.c",
+      "src/glx_context.c",
+      "src/linux_joystick.c",
+      "src/posix_time.c",
+      "src/posix_tls.c",
+      "src/x11_init.c",
+      "src/x11_monitor.c",
+      "src/x11_window.c",
+      "src/xkb_unicode.c",
+    ]
+  }
+  public_configs = [ ":glfw_config" ]
+}