webrtc.mozbuild (1921B)
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 7 # This file mimics the defines used by any headers in libwebrtc that get 8 # included in Mozilla code. 9 # We currently audit these by hand. Searching for the defines upstream is a good 10 # start: 11 # https://source.chromium.org/search?q=usage:%23if.*def.*%5B%5E_%5D$%20AND%20path:%5C.h%20AND%20path:%5Ethird_party%2Fwebrtc&ss=chromium 12 13 if CONFIG["MOZ_WEBRTC"]: 14 DEFINES["HAVE_UINT64_T"] = True 15 DEFINES["WEBRTC_MOZILLA_BUILD"] = True 16 DEFINES["RTC_ENABLE_VP9"] = True 17 18 if CONFIG["OS_TARGET"] != "WINNT": 19 DEFINES["WEBRTC_POSIX"] = True 20 DEFINES["WEBRTC_BUILD_LIBEVENT"] = True 21 22 if CONFIG["OS_TARGET"] == "Linux": 23 DEFINES["WEBRTC_LINUX"] = True 24 if ( 25 CONFIG["TARGET_CPU"] == "x86" 26 or CONFIG["TARGET_CPU"] == "x86_64" 27 or CONFIG["TARGET_CPU"] == "arm" 28 or CONFIG["TARGET_CPU"] == "aarch64" 29 or ( 30 CONFIG["TARGET_ENDIANNESS"] == "little" 31 and CONFIG["TARGET_CPU"].startswith("mips") 32 ) 33 ): 34 DEFINES["WEBRTC_USE_PIPEWIRE"] = True 35 elif CONFIG["OS_TARGET"] == "Darwin": 36 DEFINES["WEBRTC_MAC"] = True 37 elif CONFIG["OS_TARGET"] == "WINNT": 38 DEFINES["WEBRTC_WIN"] = True 39 DEFINES["RTC_ENABLE_WIN_WGC"] = True 40 DEFINES["HAVE_WINSOCK2_H"] = True 41 elif CONFIG["OS_TARGET"] in ("DragonFly", "FreeBSD", "NetBSD", "OpenBSD"): 42 DEFINES["WEBRTC_BSD"] = True 43 elif CONFIG["OS_TARGET"] == "Android": 44 DEFINES["WEBRTC_LINUX"] = True 45 DEFINES["WEBRTC_ANDROID"] = True 46 47 if CONFIG["MOZ_X11"]: 48 DEFINES["WEBRTC_USE_X11"] = True