moz.build (3632B)
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- 2 # vim: set filetype=python: 3 # This Source Code Form is subject to the terms of the Mozilla Public 4 # License, v. 2.0. If a copy of the MPL was not distributed with this 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 include("/dom/media/webrtc/third_party_build/webrtc.mozbuild") 7 8 with Files("**"): 9 BUG_COMPONENT = ("Core", "WebRTC: Audio/Video") 10 11 with Files("PeerIdentity.*"): 12 BUG_COMPONENT = ("Core", "WebRTC: Signaling") 13 14 with Files("common/**"): 15 BUG_COMPONENT = ("Core", "WebRTC: Signaling") 16 with Files("jsep/**"): 17 BUG_COMPONENT = ("Core", "WebRTC: Signaling") 18 with Files("libwebrtcglue/**"): 19 BUG_COMPONENT = ("Core", "WebRTC: Signaling") 20 with Files("transportbridge/**"): 21 BUG_COMPONENT = ("Core", "WebRTC: Signaling") 22 with Files("jsapi/**"): 23 BUG_COMPONENT = ("Core", "WebRTC: Signaling") 24 with Files("sdp/**"): 25 BUG_COMPONENT = ("Core", "WebRTC: Signaling") 26 with Files("third_party_build/**"): 27 BUG_COMPONENT = ("Core", "WebRTC") 28 29 30 EXPORTS += [ 31 "CubebDeviceEnumerator.h", 32 "MediaEngine.h", 33 "MediaEngineFake.h", 34 "MediaEnginePrefs.h", 35 "MediaEngineSource.h", 36 "MediaTrackConstraints.h", 37 "SineWaveGenerator.h", 38 ] 39 40 SOURCES += [ 41 "CubebDeviceEnumerator.cpp", 42 ] 43 44 LOCAL_INCLUDES += [ 45 "/dom/media/systemservices", 46 ] 47 48 if CONFIG["MOZ_WEBRTC"]: 49 EXPORTS += [ 50 "MediaEngineRemoteVideoSource.h", 51 "MediaEngineWebRTC.h", 52 "MediaEngineWebRTCAudio.h", 53 ] 54 EXPORTS.mozilla.dom += ["RTCIdentityProviderRegistrar.h"] 55 UNIFIED_SOURCES += [ 56 "MediaEngineRemoteVideoSource.cpp", 57 "MediaEngineWebRTCAudio.cpp", 58 "RTCCertificate.cpp", 59 "RTCIdentityProviderRegistrar.cpp", 60 ] 61 # MediaEngineWebRTC.cpp needs to be built separately. 62 SOURCES += [ 63 "MediaEngineWebRTC.cpp", 64 ] 65 PREPROCESSED_IPDL_SOURCES += [ 66 "PWebrtcGlobal.ipdl", 67 ] 68 LOCAL_INCLUDES += [ 69 "!/dist/include/libwebrtc_overrides", 70 "/dom/base", 71 "/dom/media", 72 "/dom/media/webrtc/common", 73 "/dom/media/webrtc/common/browser_logging", 74 "/media/libyuv/libyuv/include", 75 "/third_party/abseil-cpp", 76 "/third_party/libwebrtc", 77 ] 78 79 if CONFIG["MOZ_WEBRTC_SIGNALING"]: 80 DIRS += [ 81 "common", 82 "jsapi", 83 "jsep", 84 "libwebrtcglue", 85 "libwebrtc_overrides", 86 "sdp", 87 "transportbridge", 88 "/third_party/libwebrtc", 89 "/third_party/abseil-cpp", 90 ] 91 92 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": 93 DIRS += [ 94 "/third_party/drm/libdrm", 95 "/third_party/libepoxy/", 96 "/third_party/pipewire/libpipewire", 97 ] 98 99 # Avoid warnings from third-party code that we can not modify. 100 if CONFIG["CC_TYPE"] == "clang-cl": 101 CXXFLAGS += ["-Wno-invalid-source-encoding"] 102 103 104 PREPROCESSED_IPDL_SOURCES += [ 105 "PMediaTransport.ipdl", 106 ] 107 108 UNIFIED_SOURCES += [ 109 "MediaEngineFake.cpp", 110 "MediaEngineSource.cpp", 111 "MediaTrackConstraints.cpp", 112 "PeerIdentity.cpp", 113 ] 114 115 EXPORTS.mozilla += [ 116 "PeerIdentity.h", 117 ] 118 EXPORTS.mozilla.dom += [ 119 "RTCCertificate.h", 120 ] 121 122 include("/ipc/chromium/chromium-config.mozbuild") 123 124 # Suppress some GCC/clang warnings being treated as errors: 125 # - about attributes on forward declarations for types that are already 126 # defined, which complains about important MOZ_EXPORT attributes for 127 # android API types 128 CXXFLAGS += [ 129 "-Wno-error=attributes", 130 ] 131 132 FINAL_LIBRARY = "xul" 133 134 # Add libFuzzer configuration directives 135 include("/tools/fuzzing/libfuzzer-config.mozbuild")