Don't add libopus to public_deps, its headers are only used directly
Bug: webrtc:8603
Change-Id: I2ce1f96a80dd23e420b3693b899d2b14382fd2d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266765
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Oleh Prypin <oprypin@google.com>
Cr-Commit-Position: refs/heads/main@{#37363}
diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn
index e411819..fd1237b 100644
--- a/modules/audio_coding/BUILD.gn
+++ b/modules/audio_coding/BUILD.gn
@@ -773,12 +773,6 @@
[ ":webrtc_opus_wrapper" ]
defines = audio_codec_defines
-
- if (rtc_build_opus) {
- public_deps += [ rtc_opus_dir ] # no-presubmit-check TODO(webrtc:8603)
- } else if (build_with_mozilla) {
- include_dirs = [ "/media/libopus/include" ]
- }
}
rtc_library("webrtc_multiopus") {
@@ -813,12 +807,6 @@
[ ":webrtc_opus_wrapper" ]
defines = audio_codec_defines
-
- if (rtc_build_opus) {
- public_deps += [ rtc_opus_dir ]
- } else if (build_with_mozilla) {
- include_dirs = [ "/media/libopus/include" ]
- }
}
rtc_library("webrtc_opus_wrapper") {
@@ -831,18 +819,19 @@
defines = audio_coding_defines
- if (rtc_build_opus) {
- public_deps = [ rtc_opus_dir ] # no-presubmit-check TODO(webrtc:8603)
- } else if (build_with_mozilla) {
- include_dirs = [ getenv("DIST") + "/include/opus" ]
- }
-
deps = [
"../../api:array_view",
"../../rtc_base:checks",
"../../rtc_base:ignore_wundef",
"../../system_wrappers:field_trial",
]
+
+ if (rtc_build_opus) {
+ deps += [ rtc_opus_dir ]
+ public_configs = [ "//third_party/opus:opus_config" ]
+ } else if (build_with_mozilla) {
+ include_dirs = [ getenv("DIST") + "/include/opus" ]
+ }
}
if (rtc_enable_protobuf) {
diff --git a/modules/audio_coding/codecs/opus/DEPS b/modules/audio_coding/codecs/opus/DEPS
new file mode 100644
index 0000000..c253072
--- /dev/null
+++ b/modules/audio_coding/codecs/opus/DEPS
@@ -0,0 +1,5 @@
+specific_include_rules = {
+ "opus_inst\.h": [
+ "+third_party/opus",
+ ],
+}
diff --git a/modules/audio_coding/codecs/opus/opus_inst.h b/modules/audio_coding/codecs/opus/opus_inst.h
index 2c25e43..92c5c35 100644
--- a/modules/audio_coding/codecs/opus/opus_inst.h
+++ b/modules/audio_coding/codecs/opus/opus_inst.h
@@ -16,8 +16,8 @@
#include "rtc_base/ignore_wundef.h"
RTC_PUSH_IGNORING_WUNDEF()
-#include "opus.h"
-#include "opus_multistream.h"
+#include "third_party/opus/src/include/opus.h"
+#include "third_party/opus/src/include/opus_multistream.h"
RTC_POP_IGNORING_WUNDEF()
struct WebRtcOpusEncInst {