Convert GN libs lists to frameworks

GN recently added support for Apple frameworks to link, rather than
overloading the libs lists. This pulls .frameworks out of the libs
lists, so that GN can stop supporting .frameworks in libs in the
future.

Bug: chromium:1052560
Change-Id: I0b57a3c4c995887a57937317db30b67cf7a7f0f7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24281
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Sylvain Defresne 2020-07-15 09:59:46 +00:00 committed by Commit Bot service account
parent 9da11c990f
commit 212c5bd9b2
4 changed files with 10 additions and 11 deletions

View File

@ -70,10 +70,7 @@ config("dawn_native_internal") {
config("dawn_native_weak_framework") {
if (is_mac && dawn_enable_metal) {
ldflags = [
"-weak_framework",
"Metal",
]
weak_frameworks = [ "Metal.framework" ]
}
}
@ -358,7 +355,7 @@ source_set("dawn_native_sources") {
}
if (dawn_enable_metal) {
libs += [
frameworks = [
"Cocoa.framework",
"IOKit.framework",
"IOSurface.framework",

View File

@ -331,7 +331,7 @@ source_set("dawn_end2end_tests_sources") {
if (dawn_enable_metal) {
sources += [ "end2end/IOSurfaceWrappingTests.cpp" ]
libs += [ "IOSurface.framework" ]
frameworks = [ "IOSurface.framework" ]
}
if (dawn_enable_opengl) {
@ -484,7 +484,7 @@ test("dawn_perf_tests") {
}
if (dawn_enable_metal) {
libs += [ "IOSurface.framework" ]
frameworks = [ "IOSurface.framework" ]
}
if (dawn_enable_opengl) {

View File

@ -87,6 +87,7 @@ static_library("dawn_utils") {
"${dawn_shaderc_dir}:libshaderc",
]
libs = []
frameworks = []
if (is_win) {
sources += [ "WindowsTimer.cpp" ]
@ -96,7 +97,7 @@ static_library("dawn_utils") {
"ObjCUtils.h",
"ObjCUtils.mm",
]
libs += [ "QuartzCore.framework" ]
frameworks += [ "QuartzCore.framework" ]
} else {
sources += [ "PosixTimer.cpp" ]
}
@ -110,7 +111,7 @@ static_library("dawn_utils") {
if (dawn_enable_metal) {
sources += [ "GLFWUtils_metal.mm" ]
libs += [ "Metal.framework" ]
frameworks += [ "Metal.framework" ]
}
}
@ -139,6 +140,7 @@ if (dawn_standalone) {
"${dawn_root}/src/dawn_native",
]
libs = []
frameworks = []
if (dawn_enable_d3d12) {
sources += [ "D3D12Binding.cpp" ]
@ -146,7 +148,7 @@ if (dawn_standalone) {
if (dawn_enable_metal) {
sources += [ "MetalBinding.mm" ]
libs += [
frameworks += [
"Metal.framework",
"QuartzCore.framework",
]

View File

@ -134,7 +134,7 @@ static_library("glfw") {
"${glfw_dir}/src/nsgl_context.h",
"${glfw_dir}/src/nsgl_context.m",
]
libs += [
frameworks = [
"Cocoa.framework",
"IOKit.framework",
"CoreFoundation.framework",