moz.build (1639B)
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 with Files("**"): 8 BUG_COMPONENT = ("Core", "Audio/Video: GMP") 9 10 GeckoSharedLibrary("clearkey") 11 12 # Android wants all libraries to be packaged under dist/bin so that we can 13 # place them in the APK under lib/<arch>. We have special logic in GMP that 14 # configure the clearkey library for us. 15 if CONFIG["OS_TARGET"] == "Android": 16 FINAL_TARGET = "dist/bin" 17 else: 18 FINAL_TARGET = "dist/bin/gmp-clearkey/0.1" 19 20 FINAL_TARGET_PP_FILES += ["manifest.json.in"] 21 22 USE_LIBS += ["gecko-clearkey"] 23 24 UNIFIED_SOURCES += [ 25 "ClearKeyCDM.cpp", 26 "gmp-clearkey.cpp", 27 ] 28 29 if CONFIG["OS_ARCH"] == "WINNT": 30 UNIFIED_SOURCES += [ 31 "VideoDecoder.cpp", 32 "WMFH264Decoder.cpp", 33 ] 34 35 SOURCES += [ 36 "WMFUtils.cpp", 37 ] 38 39 OS_LIBS += [ 40 "mfuuid", 41 "uuid", 42 ] 43 44 DEFINES["ENABLE_WMF"] = True 45 46 DEFINES["CDM_IMPLEMENTATION"] = True 47 48 DisableStlWrapping() 49 DEFINES["MOZ_NO_MOZALLOC"] = True 50 51 # Suppress warnings in third-party code. 52 CFLAGS += [ 53 "-Wno-pointer-to-int-cast", 54 "-Wno-sign-compare", 55 ] 56 57 if CONFIG["CC_TYPE"] in ("clang", "gcc"): 58 CFLAGS += [ 59 "-include", 60 "stdio.h", # for sprintf() prototype 61 "-include", 62 "unistd.h", # for getpid() prototype 63 ] 64 elif CONFIG["CC_TYPE"] == "clang-cl": 65 CFLAGS += [ 66 "-FI", 67 "stdio.h", # for sprintf() prototype 68 ]