summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordknn <yoann.blein@free.fr>2012-08-17 12:15:05 (GMT)
committerdknn <yoann.blein@free.fr>2012-09-22 09:32:38 (GMT)
commit231102424d9768cc17e222cd779c6814f01433b7 (patch)
tree4ac51bb5810a0007d6f89dfced00a3780425ff4f
parentdce09fe24d55d67f60d7bc691e285897f1d64fc2 (diff)
downloadswift-contrib-231102424d9768cc17e222cd779c6814f01433b7.zip
swift-contrib-231102424d9768cc17e222cd779c6814f01433b7.tar.bz2
Add JRTPLIB SConscript
-rw-r--r--3rdParty/JRTPLIB/SConscript116
-rw-r--r--BuildTools/SCons/SConstruct6
2 files changed, 118 insertions, 4 deletions
diff --git a/3rdParty/JRTPLIB/SConscript b/3rdParty/JRTPLIB/SConscript
new file mode 100644
index 0000000..e3dafd1
--- /dev/null
+++ b/3rdParty/JRTPLIB/SConscript
@@ -0,0 +1,116 @@
+Import(["env", "conf_env"])
+
+if env.get("JRTPLIB_BUNDLED", False) :
+
+################################################################################
+# Common
+################################################################################
+
+ cppdefines = ["RTP_SUPPORT_RTCPUNKNOWN",
+ ("JRTPLIB_EXPORT", ""),
+ ("JRTPLIB_IMPORTEXPORT", "JRTPLIB_EXPORT"),
+ "RTP_SOCKLENTYPE_UINT",
+ "RTP_SUPPORT_IPV4MULTICAST",
+ "RTP_SUPPORT_SDESPRIV",
+ "RTP_SUPPORT_PROBATION",
+ "RTP_SUPPORT_GETLOGINR",
+ "RTP_SUPPORT_IPV6",
+ "RTP_SUPPORT_IPV6MULTICAST",
+ "RTP_SUPPORT_IFADDRS",
+ "RTP_SUPPORT_SENDAPP",
+ ]
+
+ if env["PLATFORM"] != "win32" :
+ cppdefines += ["RTPCONFIG_UNIX_H", ]
+ if env["PLATFORM"] != "win32" :
+ cppflags = [("-include", "sys/types.h"), ("-include", "stdint.h")]
+
+
+################################################################################
+# Module flags
+################################################################################
+
+ if env["SCONS_STAGE"] == "flags" :
+ env["JRTPLIB_FLAGS"] = {
+ "CPPPATH": [Dir("src/")],
+ "LIBPATH": [Dir(".")],
+ "LIBS": ["Swiften_JRTPLIB"],
+ "INTERNAL_CPPDEFINES": ["STATICLIB"],
+ "CPPDEFINES": cppdefines,
+ "CPPFLAGS": cppflags,
+ }
+ #if env["PLATFORM"] == "win32" :
+ # env["LIBIDN_FLAGS"]["CPPPATH"] += [Dir("stubs/win32")]
+ # if env["MSVC_VERSION"][:3] == "9.0" :
+ # env["LIBIDN_FLAGS"]["CPPPATH"] += [Dir("stubs/win32/VC2008")]
+
+################################################################################
+# Build
+################################################################################
+
+ if env["SCONS_STAGE"] == "build" :
+ myenv = env.Clone()
+ myenv.Append(CPPPATH = ["src"])
+ # Remove warn flags
+ myenv.Replace(CXXFLAGS = [flag for flag in env["CCFLAGS"] if flag not in ["-W", "-Wall"]])
+
+ #myenv.Append(CCFLAGS = ["-DNDEBUG", "-DSTATICLIB"])
+
+ #if myenv["PLATFORM"] != "win32":
+ # myenv.Append(CCFLAGS = ["-DMINIUPNPC_SET_SOCKET_TIMEOUT"])
+
+ #if myenv["PLATFORM"] == "darwin":
+ # myenv.Append(CCFLAGS = ["-DMACOSX", "-D_DARWIN_C_SOURCE"])
+
+ #if myenv["PLATFORM"] == "win32":
+ # myenv.Append(CCFLAGS = ["-DWIN32"])
+
+ src_files = [
+ "src/rtpsession.cpp",
+ "src/rtpexternaltransmitter.cpp",
+ "src/rtppacket.cpp",
+ "src/rtpsourcedata.cpp",
+ "src/rtpsessionparams.cpp",
+ "src/rtpexternaltransmitter.cpp",
+ "src/rtpipv4address.cpp",
+ "src/rtcpapppacket.cpp",
+ "src/rtcpbyepacket.cpp",
+ "src/rtcpcompoundpacketbuilder.cpp",
+ "src/rtcpcompoundpacket.cpp",
+ "src/rtcppacketbuilder.cpp",
+ "src/rtcppacket.cpp",
+ "src/rtcprrpacket.cpp",
+ "src/rtcpscheduler.cpp",
+ "src/rtcpsdesinfo.cpp",
+ "src/rtcpsdespacket.cpp",
+ "src/rtcpsrpacket.cpp",
+ "src/rtpbyteaddress.cpp",
+ "src/rtpcollisionlist.cpp",
+ "src/rtpdebug.cpp",
+ "src/rtperrors.cpp",
+ "src/rtpexternaltransmitter.cpp",
+ "src/rtpinternalsourcedata.cpp",
+ "src/rtpipv4address.cpp",
+ "src/rtpipv6address.cpp",
+ "src/rtplibraryversion.cpp",
+ "src/rtppacketbuilder.cpp",
+ "src/rtppacket.cpp",
+ "src/rtppollthread.cpp",
+ "src/rtprandom.cpp",
+ "src/rtprandomrand48.cpp",
+ "src/rtprandomrands.cpp",
+ "src/rtprandomurandom.cpp",
+ "src/rtpsession.cpp",
+ "src/rtpsessionparams.cpp",
+ "src/rtpsessionsources.cpp",
+ "src/rtpsourcedata.cpp",
+ "src/rtpsources.cpp",
+ "src/rtptimeutilities.cpp",
+ "src/rtpudpv4transmitter.cpp",
+ "src/rtpudpv6transmitter.cpp",
+ ]
+
+ #if myenv["PLATFORM"] == "win32":
+ # src_files += ["src/libnatpmp/wingettimeofday.c"]
+
+ myenv.StaticLibrary("Swiften_JRTPLIB", src_files)
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index daaa98d..7087610 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -493,12 +493,10 @@ if env["experimental"] :
env["HAVE_JRTPLIB"] = 1
env["JRTPLIB_FLAGS"] = { "LIBS": [env["jrtplib_libname"]] }
env["JRTPLIB_FLAGS"].update(jrtplib_flags)
+ else:
+ env["JRTPLIB_BUNDLED"] = 1
conf.Finish()
- #env["JRTPLIB_BUNDLED"] = 1
-#else :
- #env["JRTPLIB_FLAGS"] = {}
-
# libvpx
if env["experimental"] :
libvpx_conf_env = conf_env.Clone()