-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GLFW (DEPS-based) to third_party (#225)
GLFW is needed for the GLFW-based Windows and Linux desktop Flutter shells.
- Loading branch information
1 parent
9c7b023
commit ee817fb
Showing
2 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Copyright 2013 The Flutter Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
_checkout_dir = "//third_party/glfw" | ||
|
||
config("relative_glfw_headers") { | ||
include_dirs = [ "$_checkout_dir/include" ] | ||
} | ||
|
||
source_set("glfw") { | ||
public = [ | ||
"$_checkout_dir/include/GLFW/glfw3.h", | ||
"$_checkout_dir/include/GLFW/glfw3native.h", | ||
] | ||
|
||
sources = [ | ||
"$_checkout_dir/src/context.c", | ||
"$_checkout_dir/src/init.c", | ||
"$_checkout_dir/src/input.c", | ||
"$_checkout_dir/src/monitor.c", | ||
"$_checkout_dir/src/vulkan.c", | ||
"$_checkout_dir/src/window.c", | ||
] | ||
|
||
include_dirs = [ | ||
"$_checkout_dir/src", | ||
] | ||
|
||
public_configs = [ | ||
":relative_glfw_headers", | ||
] | ||
|
||
if (is_win) { | ||
sources += [ | ||
"$_checkout_dir/src/egl_context.c", | ||
"$_checkout_dir/src/egl_context.h", | ||
"$_checkout_dir/src/wgl_context.c", | ||
"$_checkout_dir/src/wgl_context.h", | ||
"$_checkout_dir/src/win32_init.c", | ||
"$_checkout_dir/src/win32_joystick.c", | ||
"$_checkout_dir/src/win32_joystick.h", | ||
"$_checkout_dir/src/win32_monitor.c", | ||
"$_checkout_dir/src/win32_platform.h", | ||
"$_checkout_dir/src/win32_time.c", | ||
"$_checkout_dir/src/win32_tls.c", | ||
"$_checkout_dir/src/win32_window.c", | ||
] | ||
|
||
defines = [ "_GLFW_WIN32" ] | ||
} else if (is_linux) { | ||
sources += [ | ||
"$_checkout_dir/src/egl_context.c", | ||
"$_checkout_dir/src/egl_context.h", | ||
"$_checkout_dir/src/glx_context.c", | ||
"$_checkout_dir/src/glx_context.h", | ||
"$_checkout_dir/src/linux_joystick.c", | ||
"$_checkout_dir/src/linux_joystick.h", | ||
"$_checkout_dir/src/posix_tls.c", | ||
"$_checkout_dir/src/posix_tls.h", | ||
"$_checkout_dir/src/posix_time.c", | ||
"$_checkout_dir/src/posix_time.h", | ||
"$_checkout_dir/src/x11_init.c", | ||
"$_checkout_dir/src/x11_monitor.c", | ||
"$_checkout_dir/src/x11_platform.h", | ||
"$_checkout_dir/src/x11_window.c", | ||
"$_checkout_dir/src/xkb_unicode.c", | ||
"$_checkout_dir/src/xkb_unicode.h", | ||
] | ||
|
||
defines = [ | ||
"_GLFW_X11", | ||
"_GLFW_HAS_XF86VM", | ||
] | ||
|
||
configs -= [ "//build/config/compiler:chromium_code" ] | ||
configs += [ "//build/config/compiler:no_chromium_code" ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Name: GLFW | ||
License: zlib/libpng (BSD-like) | ||
Upstream Git: https://github.com/glfw/glfw | ||
Version: 3.2.1 | ||
Description: | ||
|
||
GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and | ||
Vulkan development on the desktop. | ||
|
||
To update: | ||
- Advance the pinned hash in DEPS, which should map the repository to | ||
//third_party/glfw | ||
- Update BUILD.gn if necessary for changes. |