1
0
Fork 0
flightgear/3rdparty/iaxclient/lib/portaudio/bindings/cpp/SConscript
Clément de l'Hamaide c022bb8d51 Move IAXClient library into 3rdparty directory
Remove ENABLE_IAX option
Add an improved FGCom standalone as part of FG in utils directory
2013-09-27 16:05:45 +02:00

41 lines
1.6 KiB
Python

import os.path
Import("env", "buildDir")
env.Append(CPPPATH="include")
ApiVer = "0.0.12"
Major, Minor, Micro = [int(c) for c in ApiVer.split(".")]
sharedLibs = []
staticLibs = []
Import("Platform", "Posix")
if Platform in Posix:
env["SHLIBSUFFIX"] = ".so.%d.%d.%d" % (Major, Minor, Micro)
soFile = "libportaudiocpp.so"
env.AppendUnique(SHLINKFLAGS="-Wl,-soname=%s.%d" % (soFile, Major))
# Create symlinks
def symlink(env, target, source):
trgt = str(target[0])
src = str(source[0])
if os.path.islink(trgt) or os.path.exists(trgt):
os.remove(trgt)
os.symlink(os.path.basename(src), trgt)
lnk0 = env.Command(soFile + ".%d" % (Major), soFile + ".%d.%d.%d" % (Major, Minor, Micro), symlink)
lnk1 = env.Command(soFile, soFile + ".%d" % (Major), symlink)
sharedLibs.append(lnk0)
sharedLibs.append(lnk1)
src = [os.path.join("source", "portaudiocpp", "%s.cxx" % f) for f in ("BlockingStream", "CallbackInterface", \
"CallbackStream", "CFunCallbackStream","CppFunCallbackStream", "Device",
"DirectionSpecificStreamParameters", "Exception", "HostApi", "InterfaceCallbackStream",
"MemFunCallbackStream", "Stream", "StreamParameters", "System", "SystemDeviceIterator",
"SystemHostApiIterator")]
env.Append(LIBS="portaudio", LIBPATH=buildDir)
sharedLib = env.SharedLibrary("portaudiocpp", src, LIBS=["portaudio"])
staticLib = env.Library("portaudiocpp", src, LIBS=["portaudio"])
sharedLibs.append(sharedLib)
staticLibs.append(staticLib)
from glob import glob
headers = [File(f) for f in glob(os.path.join("include", "portaudiocpp", "*"))]
Return("sharedLibs", "staticLibs", "headers")