import talk Import("env") talk.Library(env, name = "expat", cppdefines = [ "XML_STATIC", ], srcs = [ "third_party/expat-2.0.1/lib/xmlparse.c", "third_party/expat-2.0.1/lib/xmlrole.c", "third_party/expat-2.0.1/lib/xmltok.c", ], includedirs = [ "third_party/expat-2.0.1/lib", ], win_cppdefines = [ "COMPILED_FROM_DSP", ], posix_cppdefines = [ "HAVE_EXPAT_CONFIG_H", ], ) talk.Library(env, name = "gunit", srcs = [ "third_party/gtest/src/gtest-all.cc", ], includedirs = [ "third_party/gtest/include", "third_party/expat-2.0.1/lib", "third_party/srtp", "third_party/gtest", ], cppdefines = [ "EXPAT_RELATIVE_PATH", "GTEST_RELATIVE_PATH", "SRTP_RELATIVE_PATH", ], ) talk.Library(env, name = "srtp", srcs = [ "third_party/srtp/crypto/cipher/aes.c", "third_party/srtp/crypto/cipher/aes_cbc.c", "third_party/srtp/crypto/cipher/aes_icm.c", "third_party/srtp/crypto/cipher/cipher.c", "third_party/srtp/crypto/cipher/null_cipher.c", "third_party/srtp/crypto/hash/auth.c", "third_party/srtp/crypto/hash/hmac.c", "third_party/srtp/crypto/hash/null_auth.c", "third_party/srtp/crypto/hash/sha1.c", "third_party/srtp/crypto/replay/rdb.c", "third_party/srtp/crypto/replay/rdbx.c", "third_party/srtp/crypto/replay/ut_sim.c", "third_party/srtp/crypto/math/datatypes.c", "third_party/srtp/crypto/math/stat.c", "third_party/srtp/crypto/kernel/alloc.c", "third_party/srtp/crypto/kernel/crypto_kernel.c", "third_party/srtp/crypto/kernel/err.c", "third_party/srtp/crypto/kernel/key.c", "third_party/srtp/crypto/rng/ctr_prng.c", "third_party/srtp/crypto/rng/rand_source.c", "third_party/srtp/srtp/ekt.c", "third_party/srtp/srtp/srtp.c", ], includedirs = [ "third_party/srtp/include", "third_party/srtp/crypto/include", ], win_ccflags = [ "/wd4701", "/wd4702", ], ) # Set up the SSL/TLS includes if 'NSS_BUILD_PLATFORM' in env['ENV']: SSL_INCLUDES = [ "third_party/mozilla/dist/public/nss", "third_party/mozilla/dist/" + env['ENV']['NSS_BUILD_PLATFORM']+ "/include" ] SSL_LIBS = [ "ssl3", "nss3", "nssutil3", "plc4", "plds4", "nspr4", ] else: SSL_INCLUDES = ["third_party/openssl/include"] SSL_LIBS = ["crypto", "ssl"] talk.Library(env, name = "jingle", lin_packages = [ "x11", "xcomposite", "xrender", ], lin_srcs = [ "base/latebindingsymboltable.cc", "base/latebindingsymboltable.h.def", "base/latebindingsymboltable.cc.def", "base/linux.cc", "base/linuxfdwalk.c", "base/linuxwindowpicker.cc", "media/devices/libudevsymboltable.cc", "media/devices/linuxdeviceinfo.cc", "media/devices/linuxdevicemanager.cc", "media/devices/v4llookup.cc", "sound/alsasoundsystem.cc", "sound/alsasymboltable.cc", "sound/linuxsoundsystem.cc", "sound/pulseaudiosoundsystem.cc", "sound/pulseaudiosymboltable.cc", ], dependent_target_settings = { 'lin_libs': [ "dl", "pthread", "rt", "gthread-2.0", ], 'mac_libs': SSL_LIBS, 'win_libs': [ "winmm.lib", ], }, mac_srcs = [ "base/macasyncsocket.cc", "base/maccocoasocketserver.mm", "base/maccocoathreadhelper.mm", "base/macconversion.cc", "base/macsocketserver.cc", "base/macutils.cc", "base/macwindowpicker.cc", "base/scoped_autorelease_pool.mm", "media/devices/carbonvideorenderer.cc", "media/devices/macdeviceinfo.cc", "media/devices/macdevicemanager.cc", "media/devices/macdevicemanagermm.mm", ], posix_srcs = [ "base/unixfilesystem.cc", "base/posix.cc", ], linphone_srcs = [ "media/other/linphonemediaengine.cc", ], cppdefines = [ "FEATURE_ENABLE_VOICEMAIL", "EXPAT_RELATIVE_PATH", "GTEST_RELATIVE_PATH", "SRTP_RELATIVE_PATH", "XML_STATIC", ], srcs = [ "base/asyncfile.cc", "base/asynchttprequest.cc", "base/asyncsocket.cc", "base/asynctcpsocket.cc", "base/asyncudpsocket.cc", "base/autodetectproxy.cc", "base/bandwidthsmoother.cc", "base/base64.cc", "base/basicpacketsocketfactory.cc", "base/bytebuffer.cc", "base/checks.cc", "base/common.cc", "base/cpumonitor.cc", "base/crc32.cc", "base/diskcache.cc", "base/event.cc", "base/filelock.cc", "base/fileutils.cc", "base/firewallsocketserver.cc", "base/flags.cc", "base/helpers.cc", "base/host.cc", "base/httpbase.cc", "base/httpclient.cc", "base/httpcommon.cc", "base/httprequest.cc", "base/httpserver.cc", "base/ipaddress.cc", "base/logging.cc", "base/md5.cc", "base/messagedigest.cc", "base/messagehandler.cc", "base/messagequeue.cc", "base/multipart.cc", "base/natserver.cc", "base/natsocketfactory.cc", "base/nattypes.cc", "base/nethelpers.cc", "base/network.cc", "base/nssidentity.cc", "base/nssstreamadapter.cc", "base/openssladapter.cc", "base/openssldigest.cc", "base/opensslidentity.cc", "base/opensslstreamadapter.cc", "base/optionsfile.cc", "base/pathutils.cc", "base/physicalsocketserver.cc", "base/profiler.cc", "base/proxydetect.cc", "base/proxyinfo.cc", "base/proxyserver.cc", "base/ratelimiter.cc", "base/ratetracker.cc", "base/sha1.cc", "base/sharedexclusivelock.cc", "base/signalthread.cc", "base/socketadapters.cc", "base/socketaddress.cc", "base/socketaddresspair.cc", "base/socketpool.cc", "base/socketstream.cc", "base/ssladapter.cc", "base/sslsocketfactory.cc", "base/sslidentity.cc", "base/sslstreamadapter.cc", "base/sslstreamadapterhelper.cc", "base/stream.cc", "base/stringencode.cc", "base/stringutils.cc", "base/systeminfo.cc", "base/task.cc", "base/taskparent.cc", "base/taskrunner.cc", "base/testclient.cc", "base/thread.cc", "base/timeutils.cc", "base/timing.cc", "base/transformadapter.cc", "base/urlencode.cc", "base/versionparsing.cc", "base/virtualsocketserver.cc", "base/worker.cc", "p2p/base/constants.cc", "p2p/base/dtlstransportchannel.cc", "p2p/base/p2ptransport.cc", "p2p/base/p2ptransportchannel.cc", "p2p/base/parsing.cc", "p2p/base/port.cc", "p2p/base/portallocator.cc", "p2p/base/portallocatorsessionproxy.cc", "p2p/base/portproxy.cc", "p2p/base/pseudotcp.cc", "p2p/base/relayport.cc", "p2p/base/relayserver.cc", "p2p/base/rawtransport.cc", "p2p/base/rawtransportchannel.cc", "p2p/base/session.cc", "p2p/base/sessiondescription.cc", "p2p/base/sessionmanager.cc", "p2p/base/sessionmessages.cc", "p2p/base/stun.cc", "p2p/base/stunport.cc", "p2p/base/stunrequest.cc", "p2p/base/stunserver.cc", "p2p/base/tcpport.cc", "p2p/base/transport.cc", "p2p/base/transportchannel.cc", "p2p/base/transportchannelproxy.cc", "p2p/base/transportdescriptionfactory.cc", "p2p/base/turnport.cc", "p2p/base/turnserver.cc", "p2p/client/basicportallocator.cc", "p2p/client/connectivitychecker.cc", "p2p/client/httpportallocator.cc", "p2p/client/socketmonitor.cc", "session/tunnel/pseudotcpchannel.cc", "session/tunnel/tunnelsessionclient.cc", "session/tunnel/securetunnelsessionclient.cc", "media/base/capturemanager.cc", "media/base/capturerenderadapter.cc", "media/base/codec.cc", "media/base/constants.cc", "media/base/cpuid.cc", "media/base/filemediaengine.cc", "media/base/hybridvideoengine.cc", "media/base/mediaengine.cc", "media/base/rtpdataengine.cc", "media/base/rtpdump.cc", "media/base/rtputils.cc", "media/base/streamparams.cc", "media/base/videoadapter.cc", "media/base/videocapturer.cc", "media/base/mutedvideocapturer.cc", "media/base/videocommon.cc", "media/base/videoframe.cc", "media/devices/devicemanager.cc", "media/devices/filevideocapturer.cc", "session/media/audiomonitor.cc", "session/media/call.cc", "session/media/channel.cc", "session/media/channelmanager.cc", "session/media/currentspeakermonitor.cc", "session/media/mediamessages.cc", "session/media/mediamonitor.cc", "session/media/mediarecorder.cc", "session/media/mediasession.cc", "session/media/mediasessionclient.cc", "session/media/rtcpmuxfilter.cc", "session/media/rtcpmuxfilter.cc", "session/media/soundclip.cc", "session/media/srtpfilter.cc", "session/media/ssrcmuxfilter.cc", "session/media/typingmonitor.cc", "sound/nullsoundsystem.cc", "sound/nullsoundsystemfactory.cc", "sound/platformsoundsystem.cc", "sound/platformsoundsystemfactory.cc", "sound/soundsysteminterface.cc", "sound/soundsystemproxy.cc", "xmllite/qname.cc", "xmllite/xmlbuilder.cc", "xmllite/xmlconstants.cc", "xmllite/xmlelement.cc", "xmllite/xmlnsstack.cc", "xmllite/xmlparser.cc", "xmllite/xmlprinter.cc", "xmpp/chatroommoduleimpl.cc", "xmpp/constants.cc", "xmpp/discoitemsquerytask.cc", "xmpp/hangoutpubsubclient.cc", "xmpp/iqtask.cc", "xmpp/jid.cc", "xmpp/jingleinfotask.cc", "xmpp/moduleimpl.cc", "xmpp/mucroomconfigtask.cc", "xmpp/mucroomdiscoverytask.cc", "xmpp/mucroomlookuptask.cc", "xmpp/mucroomuniquehangoutidtask.cc", "xmpp/pingtask.cc", "xmpp/presenceouttask.cc", "xmpp/presencereceivetask.cc", "xmpp/presencestatus.cc", "xmpp/pubsubclient.cc", "xmpp/pubsub_task.cc", "xmpp/pubsubtasks.cc", "xmpp/receivetask.cc", "xmpp/rostermoduleimpl.cc", "xmpp/saslmechanism.cc", "xmpp/xmppclient.cc", "xmpp/xmppengineimpl.cc", "xmpp/xmppengineimpl_iq.cc", "xmpp/xmpplogintask.cc", "xmpp/xmppstanzaparser.cc", "xmpp/xmpptask.cc", "xmpp/xmppauth.cc", "xmpp/xmpppump.cc", "xmpp/xmppsocket.cc", "xmpp/xmppthread.cc", ], includedirs = [ "third_party/libudev", "third_party/expat-2.0.1/lib", "third_party/gtest/include", "third_party/srtp/include", "third_party/srtp/crypto/include", ] + SSL_INCLUDES, win_srcs = [ "base/diskcache_win32.cc", "base/schanneladapter.cc", "base/win32.cc", "base/win32regkey.cc", "base/win32filesystem.cc", "base/win32securityerrors.cc", "base/win32socketserver.cc", "base/win32socketinit.cc", "base/win32window.cc", "base/win32windowpicker.cc", "base/winfirewall.cc", "base/winping.cc", "media/devices/gdivideorenderer.cc", "media/devices/win32deviceinfo.cc", "media/devices/win32devicemanager.cc", ], mac_ccflags = [ "-Wno-deprecated-declarations", ], extra_srcs = [ "media/devices/dummydevicemanager.cc", "base/dbus.cc", "base/libdbusglibsymboltable.cc", "base/json.cc", "base/natserver_main.cc", ], ) talk.Library(env, name = "videorenderer", lin_srcs = [ "media/devices/gtkvideorenderer.cc", ], lin_packages = [ "gobject-2.0", "gthread-2.0", "gtk+-2.0", ], ) talk.Library(env, name = "unittest_main", libs = [ "gunit", ], srcs = [ "base/unittest_main.cc", ], includedirs = [ "third_party/gtest/include", "third_party/expat-2.0.1/lib", "third_party/srtp", "third_party/gtest", ], cppdefines = [ "EXPAT_RELATIVE_PATH", "GTEST_RELATIVE_PATH", "SRTP_RELATIVE_PATH", ], ) talk.App(env, name = "login", libs = [ "jingle", "expat", ], srcs = [ "examples/login/login_main.cc", ], posix_libs = SSL_LIBS, lin_libs = [ "videorenderer", ], ) talk.App(env, name = "chat", libs = [ "jingle", "expat", ], srcs = [ "examples/chat/chatapp.cc", "examples/chat/chat_main.cc", "examples/chat/consoletask.cc", "examples/chat/textchatreceivetask.cc", "examples/chat/textchatsendtask.cc", ], posix_libs = SSL_LIBS, ) talk.App(env, name = "call", mac_frameworks = [ "AudioToolbox", "AudioUnit", "Cocoa", "CoreAudio", "CoreFoundation", "IOKit", "QTKit", "QuickTime", ], win_libs = [ "d3d9.lib", "gdi32.lib", "powrprof.lib", "strmiids.lib", "winmm.lib", ], posix_libs = SSL_LIBS, lin_libs = [ "videorenderer", ], srcs = [ "examples/call/call_main.cc", "examples/call/callclient.cc", "examples/call/console.cc", "examples/call/friendinvitesendtask.cc", "examples/call/mediaenginefactory.cc", "examples/call/mucinviterecvtask.cc", "examples/call/mucinvitesendtask.cc", "examples/call/presencepushtask.cc", ], libs = [ "jingle", "expat", "srtp", ], ) talk.App(env, name = "relayserver", libs = [ "jingle", ], srcs = [ "p2p/base/relayserver_main.cc", ], ) talk.App(env, name = "stunserver", libs = [ "jingle", ], srcs = [ "p2p/base/stunserver_main.cc", ], ) talk.App(env, name = "turnserver", lin_libs = [ "crypto", "ssl", ], srcs = [ "p2p/base/turnserver_main.cc", ], libs = [ "jingle", ], ) talk.Unittest(env, name = "base", lin_srcs = [ "base/latebindingsymboltable_unittest.cc", "base/linux_unittest.cc", "base/linuxfdwalk_unittest.cc", ], mac_srcs = [ "base/macsocketserver_unittest.cc", "base/macutils_unittest.cc", "base/macwindowpicker_unittest.cc", ], posix_srcs = [ "base/sslidentity_unittest.cc", "base/sslstreamadapter_unittest.cc", ], cppdefines = [ "EXPAT_RELATIVE_PATH", "GTEST_RELATIVE_PATH", "SRTP_RELATIVE_PATH", ], srcs = [ "base/asynchttprequest_unittest.cc", "base/atomicops_unittest.cc", "base/autodetectproxy_unittest.cc", "base/bandwidthsmoother_unittest.cc", "base/base64_unittest.cc", "base/basictypes_unittest.cc", "base/bind_unittest.cc", "base/buffer_unittest.cc", "base/bytebuffer_unittest.cc", "base/byteorder_unittest.cc", "base/cpumonitor_unittest.cc", "base/crc32_unittest.cc", "base/event_unittest.cc", "base/filelock_unittest.cc", "base/fileutils_unittest.cc", "base/helpers_unittest.cc", "base/host_unittest.cc", "base/httpbase_unittest.cc", "base/httpcommon_unittest.cc", "base/httpserver_unittest.cc", "base/ipaddress_unittest.cc", "base/logging_unittest.cc", "base/md5digest_unittest.cc", "base/messagedigest_unittest.cc", "base/messagequeue_unittest.cc", "base/multipart_unittest.cc", "base/nat_unittest.cc", "base/network_unittest.cc", "base/nullsocketserver_unittest.cc", "base/optionsfile_unittest.cc", "base/pathutils_unittest.cc", "base/physicalsocketserver_unittest.cc", "base/profiler_unittest.cc", "base/proxy_unittest.cc", "base/proxydetect_unittest.cc", "base/ratelimiter_unittest.cc", "base/ratetracker_unittest.cc", "base/referencecountedsingletonfactory_unittest.cc", "base/rollingaccumulator_unittest.cc", "base/sha1digest_unittest.cc", "base/sharedexclusivelock_unittest.cc", "base/signalthread_unittest.cc", "base/sigslot_unittest.cc", "base/socket_unittest.cc", "base/socketaddress_unittest.cc", "base/stream_unittest.cc", "base/stringencode_unittest.cc", "base/stringutils_unittest.cc", "base/systeminfo_unittest.cc", "base/task_unittest.cc", "base/testclient_unittest.cc", "base/thread_unittest.cc", "base/timeutils_unittest.cc", "base/urlencode_unittest.cc", "base/versionparsing_unittest.cc", "base/virtualsocket_unittest.cc", "base/windowpicker_unittest.cc", ], includedirs = [ "third_party/gtest/include", "third_party/expat-2.0.1/lib", "third_party/srtp", "third_party/gtest", ], win_srcs = [ "base/win32_unittest.cc", "base/win32regkey_unittest.cc", "base/win32socketserver_unittest.cc", "base/win32toolhelp_unittest.cc", "base/win32window_unittest.cc", "base/win32windowpicker_unittest.cc", "base/winfirewall_unittest.cc", ], libs = [ "jingle", ], extra_srcs = [ "base/dbus_unittest.cc", "base/json_unittest.cc", "base/linuxwindowpicker_unittest.cc", ], ) talk.Unittest(env, name = "p2p", mac_FRAMEWORKS = [ "Foundation", "IOKit", "QTKit", ], mac_libs = SSL_LIBS, cppdefines = [ "EXPAT_RELATIVE_PATH", "GTEST_RELATIVE_PATH", "SRTP_RELATIVE_PATH", ], srcs = [ "p2p/base/dtlstransportchannel_unittest.cc", "p2p/base/p2ptransportchannel_unittest.cc", "p2p/base/port_unittest.cc", "p2p/base/portallocatorsessionproxy_unittest.cc", "p2p/base/pseudotcp_unittest.cc", "p2p/base/relayport_unittest.cc", "p2p/base/relayserver_unittest.cc", "p2p/base/session_unittest.cc", "p2p/base/stun_unittest.cc", "p2p/base/stunport_unittest.cc", "p2p/base/stunrequest_unittest.cc", "p2p/base/stunserver_unittest.cc", "p2p/base/transport_unittest.cc", "p2p/base/transportdescriptionfactory_unittest.cc", "p2p/base/turnport_unittest.cc", "p2p/client/connectivitychecker_unittest.cc", "p2p/client/portallocator_unittest.cc", ], includedirs = [ "third_party/gtest/include", "third_party/expat-2.0.1/lib", "third_party/srtp", "third_party/gtest", ], libs = [ "jingle", "expat", ], ) talk.Unittest(env, name = "media", win_libs = [ "winmm.lib", "strmiids", ], cppdefines = [ "EXPAT_RELATIVE_PATH", "GTEST_RELATIVE_PATH", "SRTP_RELATIVE_PATH", ], srcs = [ "media/base/capturemanager_unittest.cc", "media/base/codec_unittest.cc", "media/base/filemediaengine_unittest.cc", "media/base/rtpdataengine_unittest.cc", "media/base/rtpdump_unittest.cc", "media/base/rtputils_unittest.cc", "media/base/testutils.cc", "media/base/videocapturer_unittest.cc", "media/base/videocommon_unittest.cc", "media/devices/devicemanager_unittest.cc", "media/devices/filevideocapturer_unittest.cc", "session/media/channel_unittest.cc", "session/media/channelmanager_unittest.cc", "session/media/currentspeakermonitor_unittest.cc", "session/media/mediarecorder_unittest.cc", "session/media/mediamessages_unittest.cc", "session/media/mediasession_unittest.cc", "session/media/mediasessionclient_unittest.cc", "session/media/rtcpmuxfilter_unittest.cc", "session/media/srtpfilter_unittest.cc", "session/media/ssrcmuxfilter_unittest.cc", ], includedirs = [ "third_party/gtest/include", "third_party/expat-2.0.1/lib", "third_party/srtp", "third_party/gtest", ], libs = [ "jingle", "expat", "srtp", ], extra_srcs = [ "media/devices/dummydevicemanager_unittest.cc", ], ) talk.Unittest(env, name = "sound", libs = [ "jingle", ], srcs = [ "sound/automaticallychosensoundsystem_unittest.cc", ], mac_libs = SSL_LIBS, includedirs = [ "third_party/gtest/include", "third_party/expat-2.0.1/lib", "third_party/srtp", "third_party/gtest", ], cppdefines = [ "EXPAT_RELATIVE_PATH", "GTEST_RELATIVE_PATH", "SRTP_RELATIVE_PATH", ], ) talk.Unittest(env, name = "xmllite", libs = [ "jingle", "expat", ], srcs = [ "xmllite/qname_unittest.cc", "xmllite/xmlbuilder_unittest.cc", "xmllite/xmlelement_unittest.cc", "xmllite/xmlnsstack_unittest.cc", "xmllite/xmlparser_unittest.cc", "xmllite/xmlprinter_unittest.cc", ], mac_libs = SSL_LIBS, includedirs = [ "third_party/gtest/include", "third_party/expat-2.0.1/lib", "third_party/srtp", "third_party/gtest", ], cppdefines = [ "EXPAT_RELATIVE_PATH", "GTEST_RELATIVE_PATH", "SRTP_RELATIVE_PATH", ], ) talk.Unittest(env, name = "xmpp", mac_libs = SSL_LIBS, cppdefines = [ "EXPAT_RELATIVE_PATH", "GTEST_RELATIVE_PATH", "SRTP_RELATIVE_PATH", ], srcs = [ "xmpp/hangoutpubsubclient_unittest.cc", "xmpp/jid_unittest.cc", "xmpp/mucroomconfigtask_unittest.cc", "xmpp/mucroomdiscoverytask_unittest.cc", "xmpp/mucroomlookuptask_unittest.cc", "xmpp/mucroomuniquehangoutidtask_unittest.cc", "xmpp/pingtask_unittest.cc", "xmpp/pubsubclient_unittest.cc", "xmpp/pubsubtasks_unittest.cc", "xmpp/util_unittest.cc", "xmpp/xmppengine_unittest.cc", "xmpp/xmpplogintask_unittest.cc", "xmpp/xmppstanzaparser_unittest.cc", ], includedirs = [ "third_party/gtest/include", "third_party/expat-2.0.1/lib", "third_party/srtp", "third_party/gtest", ], libs = [ "jingle", "expat", ], extra_srcs = [ "xmpp/chatroommodule_unittest.cc", "xmpp/rostermodule_unittest.cc", ], )