dd4bea01a45e02ea047d120b14307fa56756ebe6
[platform/framework/web/crosswalk.git] / src / third_party / libjingle / source / talk / app / webrtc / webrtc.scons
1 # -*- Python -*-
2 import talk
3
4 Import('env')
5
6 # For peerconnection, we need additional flags only for GCC 4.6+.
7 peerconnection_lin_ccflags = []
8
9 if env.Bit('linux'):
10   # Detect the GCC version and update peerconnection flags.
11   (major, minor, rev) = env.GetGccVersion()
12   if major > 4 or (major == 4 and minor >= 6):
13     peerconnection_lin_ccflags = ['-Wno-error=unused-but-set-variable']
14
15
16 if env.Bit('have_webrtc_voice') and env.Bit('have_webrtc_video'):
17   # local sources
18   talk.Library(
19     env,
20     name = 'peerconnection',
21     srcs = [
22       'audiotrack.cc',
23       'jsepicecandidate.cc',
24       'jsepsessiondescription.cc',
25       'mediaconstraintsinterface.cc',
26       'mediastream.cc',
27       'mediastreamhandler.cc',
28       'mediastreamproxy.cc',
29       'mediastreamsignaling.cc',
30       'mediastreamtrackproxy.cc',
31       'peerconnectionfactory.cc',
32       'peerconnection.cc',
33       'portallocatorfactory.cc',
34       'remoteaudiosource.cc',
35       'roapmessages.cc',
36       'roapsession.cc',
37       'roapsignaling.cc',
38       'videorendererimpl.cc',
39       'videotrack.cc',
40       'webrtcsdp.cc',
41       'webrtcsession.cc',
42       'webrtcsessiondescriptionfactory.cc',
43     ],
44     lin_ccflags = peerconnection_lin_ccflags
45   )
46
47   talk.Unittest(
48     env,
49     name = 'peerconnection',
50     srcs = [
51       'test/fakeaudiocapturemodule.cc',
52       'test/fakeaudiocapturemodule_unittest.cc',
53       'test/fakevideocapturemodule.cc',
54       'test/fileframesource.cc',
55       'test/i420framesource.cc',
56       'test/staticframesource.cc',
57       'jsepsessiondescription_unittest.cc',
58       'mediastream_unittest.cc',
59       'mediastreamhandler_unittest.cc',
60       'mediastreamsignaling_unittest.cc',
61       'peerconnectioninterface_unittest.cc',
62       'peerconnection_unittest.cc',
63       'peerconnectionfactory_unittest.cc',
64       'roapmessages_unittest.cc',
65       'roapsession_unittest.cc',
66       'roapsignaling_unittest.cc',
67       'webrtcsdp_unittest.cc',
68       'webrtcsession_unittest.cc',
69     ],
70     libs = [
71       'base',
72       'expat',
73       'json',
74       'p2p',
75       'phone',
76       'srtp',
77       'xmllite',
78       'xmpp',
79       'yuvscaler',
80       'peerconnection',
81     ],
82     win_link_flags = [('', '/nodefaultlib:libcmt')[env.Bit('debug')]],
83     lin_libs = [
84       'sound',
85     ],
86     mac_libs = [
87       'crypto',
88       'ssl',
89     ],
90    )