Don't use all_dependent_configs for sdk frameworks

libs should be propagated to the final binary even without that:
https://gn.googlesource.com/gn/+/master/docs/reference.md#var_libs

But add some missing SDK framework dependencies:

* RTCNativeI420Buffer.mm uses CGBitmapContextGetBytesPerRow.
* socketrocket uses SecCertificateCopyData.

Bug: None
Change-Id: Iba38a5dfaf470a5a790d494cbec8ade44b1d16ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146082
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28605}
diff --git a/examples/BUILD.gn b/examples/BUILD.gn
index 6587a86..f3dcbfc 100644
--- a/examples/BUILD.gn
+++ b/examples/BUILD.gn
@@ -583,6 +583,7 @@
 
     libs = [
       "CFNetwork.framework",
+      "Security.framework",
       "icucore",
     ]
   }
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 8686a35..220e575 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -19,27 +19,6 @@
   defines = [ "NO_MAIN_THREAD_WRAPPING" ]
 }
 
-config("rtc_base_all_dependent_config") {
-  if (is_ios) {
-    libs = [
-      "CFNetwork.framework",
-      "Foundation.framework",
-      "Security.framework",
-      "SystemConfiguration.framework",
-      "UIKit.framework",
-    ]
-  }
-  if (is_mac) {
-    libs = [
-      "Cocoa.framework",
-      "Foundation.framework",
-      "IOKit.framework",
-      "Security.framework",
-      "SystemConfiguration.framework",
-    ]
-  }
-}
-
 if (!rtc_build_ssl) {
   config("external_ssl_library") {
     assert(rtc_ssl_root != "",
@@ -794,8 +773,6 @@
   ]
   public_configs = []
 
-  all_dependent_configs = [ ":rtc_base_all_dependent_config" ]
-
   sources = [
     "async_invoker.cc",
     "async_invoker.h",
@@ -961,6 +938,22 @@
       "mac_utils.cc",
       "mac_utils.h",
     ]
+    libs += [
+      "Cocoa.framework",
+      "Foundation.framework",
+      "IOKit.framework",
+      "Security.framework",
+      "SystemConfiguration.framework",
+    ]
+  }
+  if (is_ios) {
+    libs += [
+      "CFNetwork.framework",
+      "Foundation.framework",
+      "Security.framework",
+      "SystemConfiguration.framework",
+      "UIKit.framework",
+    ]
   }
 
   if (is_win) {
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index 8303d8a..a778fb1 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -373,6 +373,7 @@
       ]
       libs = [
         "VideoToolbox.framework",
+        "CoreGraphics.framework",
         "CoreVideo.framework",
       ]
     }