diff --git a/src/dawn_native/BUILD.gn b/src/dawn_native/BUILD.gn index 41f6d4ebe3..5d8a383f49 100644 --- a/src/dawn_native/BUILD.gn +++ b/src/dawn_native/BUILD.gn @@ -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", diff --git a/src/tests/BUILD.gn b/src/tests/BUILD.gn index c2e0419abc..fa8e1b8b17 100644 --- a/src/tests/BUILD.gn +++ b/src/tests/BUILD.gn @@ -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) { diff --git a/src/utils/BUILD.gn b/src/utils/BUILD.gn index be827d6630..a2c57c3e6e 100644 --- a/src/utils/BUILD.gn +++ b/src/utils/BUILD.gn @@ -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", ] diff --git a/third_party/gn/glfw/BUILD.gn b/third_party/gn/glfw/BUILD.gn index a5a46412ac..ba2336fbd6 100644 --- a/third_party/gn/glfw/BUILD.gn +++ b/third_party/gn/glfw/BUILD.gn @@ -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",