import os def loadrocutil(env) : OSENV = os.environ if(OSENV.has_key('ROCUTILROOT') and os.path.exists(OSENV['ROCUTILROOT'])==True): rootDir = OSENV['ROCUTILROOT'] elif(OSENV.has_key('ROCUTIL') and os.path.exists(OSENV['ROCUTIL'])==True): rootDir = OSENV['ROCUTIL'] else: print "?Neither ROCUTILROOT nor ROCUTIL env variables are set...using -DNO_ROCUTILROOT" env.Append(CPPDEFINES = {'NO_ROCUTILROOT':None}) return if env['SHOWENV'] == "1": print "Loading ROCUTIL software from ", rootDir # include files rocutilincs = [] rocutilincs.append(rootDir + '/include') env.AppendUnique(CPPPATH=rocutilincs) # library directories rocutilldir = [] rocutilldir.append(rootDir + '/lib') env.AppendUnique(LIBPATH = rocutilldir) # libraries rocutillibs = [] env.AppendUnique(LIBS = rocutillibs)