dom/media/webrtc/moz.build
author Botond Ballo <botond@mozilla.com>
Mon, 22 Dec 2014 21:45:18 -0500
changeset 233947 aef3ce3b89b9ad862b7ce5fdeaabe1c3bfa16e1d
parent 232957 fca7e00e20806222df3268628913308d8beafc87
child 234000 8dd16d1ec5e204ee42cbf936e26cb740596d90f7
permissions -rw-r--r--
Bug 1073003 - Disable -Wattribute warnings in media/webrtc. r=bustage

# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

XPIDL_MODULE = 'content_webrtc'

EXPORTS += [
    'MediaEngine.h',
    'MediaEngineCameraVideoSource.h',
    'MediaEngineDefault.h',
    'MediaTrackConstraints.h',
]

if CONFIG['MOZ_WEBRTC']:
    EXPORTS += ['AudioOutputObserver.h',
                'MediaEngineWebRTC.h']
    UNIFIED_SOURCES += [
        'MediaEngineCameraVideoSource.cpp',
        'MediaEngineTabVideoSource.cpp',
        'MediaEngineWebRTCAudio.cpp',
        'MediaEngineWebRTCVideo.cpp',
    ]
    # MediaEngineWebRTC.cpp needs to be built separately.
    SOURCES += [
        'MediaEngineWebRTC.cpp',
    ]
    LOCAL_INCLUDES += [
        '/dom/base',
        '/dom/camera',
        '/media/libyuv/include',
        '/media/webrtc/signaling/src/common',
        '/media/webrtc/signaling/src/common/browser_logging',
        '/media/webrtc/trunk',
    ]
    # Gonk camera source.
    if CONFIG['MOZ_B2G_CAMERA']:
        EXPORTS += [
            'GonkCameraImage.h',
            'MediaEngineGonkVideoSource.h',
        ]
        UNIFIED_SOURCES += [
            'GonkCameraImage.cpp',
            'MediaEngineGonkVideoSource.cpp',
        ]

XPIDL_SOURCES += [
    'nsITabSource.idl'
]

UNIFIED_SOURCES += [
    'MediaEngineDefault.cpp',
    'PeerIdentity.cpp',
]

EXPORTS.mozilla += [
    'PeerIdentity.h',
]

include('/ipc/chromium/chromium-config.mozbuild')

# Suppress some GCC/clang warnings being treated as errors:
#  - about attributes on forward declarations for types that are already
#    defined, which complains about important MOZ_EXPORT attributes for 
#    android API types
if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
  CXXFLAGS += [
    '-Wno-error=attributes'
  ]

FINAL_LIBRARY = 'xul'
if CONFIG['OS_ARCH'] == 'WINNT':
    DEFINES['NOMINMAX'] = True


if CONFIG['_MSC_VER']:
  CXXFLAGS += [
    '-wd4275', # non dll-interface class used as base for dll-interface class
  ]

FAIL_ON_WARNINGS = True