Move RTC_ENABLE_WIN_WGC define to the top level BUILD.gn

It was recommened to me to move this define to the top level BUILD.gn
file to avoid potential issues with the define not being available
where we need it.

Bug: webrtc:9273
Change-Id: Id0e939a51d1e381f684a3ae970569a255f52a5bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214101
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Austin Orion <auorion@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#33661}
diff --git a/BUILD.gn b/BUILD.gn
index 533262e..75c54b4 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -138,6 +138,10 @@
     defines += [ "WEBRTC_ENABLE_AVX2" ]
   }
 
+  if (rtc_enable_win_wgc) {
+    defines += [ "RTC_ENABLE_WIN_WGC" ]
+  }
+
   # Some tests need to declare their own trace event handlers. If this define is
   # not set, the first time TRACE_EVENT_* is called it will store the return
   # value for the current handler in an static variable, so that subsequent
diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn
index 11e6cd3..3f170fe 100644
--- a/modules/desktop_capture/BUILD.gn
+++ b/modules/desktop_capture/BUILD.gn
@@ -576,8 +576,6 @@
       "win/wgc_desktop_frame.cc",
       "win/wgc_desktop_frame.h",
     ]
-
-    defines += [ "RTC_ENABLE_WIN_WGC" ]
   }
 }