Fix build with rtc_libvpx_build_vp9=false

Like aom and openh264, VP9 can be disabled with the gn argument.

Bug: None
Change-Id: I7d67e3946afae0bb4cac8a7e591445604dda9ce1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215260
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33737}
diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn
index 96b48b6..939b153 100644
--- a/modules/video_coding/BUILD.gn
+++ b/modules/video_coding/BUILD.gn
@@ -858,9 +858,12 @@
       "codecs/test/video_encoder_decoder_instantiation_tests.cc",
       "codecs/test/videocodec_test_libvpx.cc",
       "codecs/vp8/test/vp8_impl_unittest.cc",
-      "codecs/vp9/test/vp9_impl_unittest.cc",
     ]
 
+    if (rtc_libvpx_build_vp9) {
+      sources += [ "codecs/vp9/test/vp9_impl_unittest.cc" ]
+    }
+
     # TODO(jianj): Fix crash on iOS and re-enable
     if (enable_libaom && !is_ios) {
       sources += [ "codecs/test/videocodec_test_libaom.cc" ]