未验证 提交 c10ae2be 编写于 作者: S stuartmorgan 提交者: GitHub

Add an option to build the GLFW shell on macOS (#8531)

Since the GLFW shell is likely to continue to exist in at least the
medium term, it is useful for maintenance to be able to build and use it
on any desktop platform.

Includes a buildroot roll to pick up the macOS build suppport for
third_party/glfw.
上级 29aa5fca
......@@ -120,7 +120,7 @@ allowed_hosts = [
]
deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + '5311c632822d0d2d4e4cf8cba3053cde5183c89c',
'src': 'https://github.com/flutter/buildroot.git' + '@' + '94695026d9a1d8963089a470eef26470312c5b00',
# Fuchsia compatibility
#
......
......@@ -14,7 +14,7 @@ group("darwin") {
}
if (is_mac) {
deps = [
"macos:flutter_framework",
"macos",
]
}
}
......
......@@ -7,6 +7,21 @@ assert(is_mac)
import("//build/config/mac/mac_sdk.gni")
import("$flutter_root/common/config.gni")
import("$flutter_root/shell/platform/darwin/framework_shared.gni")
import("$flutter_root/shell/platform/glfw/config.gni")
group("macos") {
deps = [
":flutter_framework",
]
if (build_glfw_shell) {
deps += [
":flutter_macos_glfw",
"$flutter_root/shell/platform/common/cpp/client_wrapper:publish_wrapper",
"$flutter_root/shell/platform/glfw:publish_headers_glfw",
"$flutter_root/shell/platform/glfw/client_wrapper:publish_wrapper_glfw",
]
}
}
_flutter_framework_name = "FlutterMacOS"
_flutter_framework_filename = "$_flutter_framework_name.framework"
......@@ -194,3 +209,13 @@ group("flutter_framework") {
":_generate_symlinks",
]
}
if (build_glfw_shell) {
shared_library("flutter_macos_glfw") {
deps = [
"$flutter_root/shell/platform/glfw:flutter_glfw",
]
public_configs = [ "$flutter_root:config" ]
}
}
# 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.
declare_args() {
# Whether to build the GLFW shell for the host platform, if available.
#
# By default, the GLFW shell is not built if there is a native toolkit shell,
# but it can be enabled for supported platforms (Windows, macOS, and Linux)
# as an extra build artifact with this flag. The native toolkit shell will
# still be built as well.
build_glfw_shell = is_linux || is_win
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册