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:
parent
9da11c990f
commit
212c5bd9b2
|
@ -70,10 +70,7 @@ config("dawn_native_internal") {
|
||||||
|
|
||||||
config("dawn_native_weak_framework") {
|
config("dawn_native_weak_framework") {
|
||||||
if (is_mac && dawn_enable_metal) {
|
if (is_mac && dawn_enable_metal) {
|
||||||
ldflags = [
|
weak_frameworks = [ "Metal.framework" ]
|
||||||
"-weak_framework",
|
|
||||||
"Metal",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,7 +355,7 @@ source_set("dawn_native_sources") {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dawn_enable_metal) {
|
if (dawn_enable_metal) {
|
||||||
libs += [
|
frameworks = [
|
||||||
"Cocoa.framework",
|
"Cocoa.framework",
|
||||||
"IOKit.framework",
|
"IOKit.framework",
|
||||||
"IOSurface.framework",
|
"IOSurface.framework",
|
||||||
|
|
|
@ -331,7 +331,7 @@ source_set("dawn_end2end_tests_sources") {
|
||||||
|
|
||||||
if (dawn_enable_metal) {
|
if (dawn_enable_metal) {
|
||||||
sources += [ "end2end/IOSurfaceWrappingTests.cpp" ]
|
sources += [ "end2end/IOSurfaceWrappingTests.cpp" ]
|
||||||
libs += [ "IOSurface.framework" ]
|
frameworks = [ "IOSurface.framework" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dawn_enable_opengl) {
|
if (dawn_enable_opengl) {
|
||||||
|
@ -484,7 +484,7 @@ test("dawn_perf_tests") {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dawn_enable_metal) {
|
if (dawn_enable_metal) {
|
||||||
libs += [ "IOSurface.framework" ]
|
frameworks = [ "IOSurface.framework" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dawn_enable_opengl) {
|
if (dawn_enable_opengl) {
|
||||||
|
|
|
@ -87,6 +87,7 @@ static_library("dawn_utils") {
|
||||||
"${dawn_shaderc_dir}:libshaderc",
|
"${dawn_shaderc_dir}:libshaderc",
|
||||||
]
|
]
|
||||||
libs = []
|
libs = []
|
||||||
|
frameworks = []
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
sources += [ "WindowsTimer.cpp" ]
|
sources += [ "WindowsTimer.cpp" ]
|
||||||
|
@ -96,7 +97,7 @@ static_library("dawn_utils") {
|
||||||
"ObjCUtils.h",
|
"ObjCUtils.h",
|
||||||
"ObjCUtils.mm",
|
"ObjCUtils.mm",
|
||||||
]
|
]
|
||||||
libs += [ "QuartzCore.framework" ]
|
frameworks += [ "QuartzCore.framework" ]
|
||||||
} else {
|
} else {
|
||||||
sources += [ "PosixTimer.cpp" ]
|
sources += [ "PosixTimer.cpp" ]
|
||||||
}
|
}
|
||||||
|
@ -110,7 +111,7 @@ static_library("dawn_utils") {
|
||||||
|
|
||||||
if (dawn_enable_metal) {
|
if (dawn_enable_metal) {
|
||||||
sources += [ "GLFWUtils_metal.mm" ]
|
sources += [ "GLFWUtils_metal.mm" ]
|
||||||
libs += [ "Metal.framework" ]
|
frameworks += [ "Metal.framework" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,6 +140,7 @@ if (dawn_standalone) {
|
||||||
"${dawn_root}/src/dawn_native",
|
"${dawn_root}/src/dawn_native",
|
||||||
]
|
]
|
||||||
libs = []
|
libs = []
|
||||||
|
frameworks = []
|
||||||
|
|
||||||
if (dawn_enable_d3d12) {
|
if (dawn_enable_d3d12) {
|
||||||
sources += [ "D3D12Binding.cpp" ]
|
sources += [ "D3D12Binding.cpp" ]
|
||||||
|
@ -146,7 +148,7 @@ if (dawn_standalone) {
|
||||||
|
|
||||||
if (dawn_enable_metal) {
|
if (dawn_enable_metal) {
|
||||||
sources += [ "MetalBinding.mm" ]
|
sources += [ "MetalBinding.mm" ]
|
||||||
libs += [
|
frameworks += [
|
||||||
"Metal.framework",
|
"Metal.framework",
|
||||||
"QuartzCore.framework",
|
"QuartzCore.framework",
|
||||||
]
|
]
|
||||||
|
|
|
@ -134,7 +134,7 @@ static_library("glfw") {
|
||||||
"${glfw_dir}/src/nsgl_context.h",
|
"${glfw_dir}/src/nsgl_context.h",
|
||||||
"${glfw_dir}/src/nsgl_context.m",
|
"${glfw_dir}/src/nsgl_context.m",
|
||||||
]
|
]
|
||||||
libs += [
|
frameworks = [
|
||||||
"Cocoa.framework",
|
"Cocoa.framework",
|
||||||
"IOKit.framework",
|
"IOKit.framework",
|
||||||
"CoreFoundation.framework",
|
"CoreFoundation.framework",
|
||||||
|
|
Loading…
Reference in New Issue