# -*- Mode: python; 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/.
include('/media/webrtc/webrtc.mozbuild')

# TODO: bug 1172551 - get these tests working on iOS
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'uikit' and CONFIG['OS_TARGET'] != 'Android':
    LOCAL_INCLUDES += [
      '/dom/media',
      '/ipc/chromium/src',
      '/media/mtransport',
      '/media/mtransport/test',
      '/media/mtransport/third_party/nrappkit/src/registry',
      '/media/webrtc/',
      '/media/webrtc/signaling/src/common',
      '/media/webrtc/signaling/src/common/time_profiling',
      '/media/webrtc/signaling/src/media-conduit',
      '/media/webrtc/signaling/src/mediapipeline',
      '/media/webrtc/signaling/src/peerconnection',
      '/media/webrtc/trunk',
      '/netwerk/srtp/src/include',
    ]

    SOURCES += [
        'jsep_session_unittest.cpp',
        'jsep_track_unittest.cpp',
        'mediaconduit_unittests.cpp',
        'rtpsources_unittests.cpp',
        'sdp_unittests.cpp',
        'videoconduit_unittests.cpp',
    ]

    # See Bug 1372950, mediapipeline tests seem to cause crashes on Windows
    if CONFIG['OS_TARGET'] != 'WINNT':
        SOURCES += [
            'mediapipeline_unittest.cpp',
        ]

    FINAL_LIBRARY = 'xul-gtest'

if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
    # This is intended as a temporary workaround to enable warning free building
    # with VS2015.
    # reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
    CXXFLAGS += ['-wd4312']

    # Disable warning for decorated name length exceeded, name was truncated
    CXXFLAGS += ['-wd4503']
