def _RealRequire(env): quiet, cfg = GetConf(env, hdf5_inc) if hdf5_inc: env.Append(CPPPATH=[hdf5_inc]) if hdf5_lib: env.Append(LIBPATH=[hdf5_lib]) if hl: excons.Link(env, hdf5hl_libname, static=hdf5_static, force=True, silent=True) excons.Link(env, hdf5_libname, static=hdf5_static, force=True, silent=True) if hdf5_static: if not quiet: excons.PrintOnce("Static build", tool="hdf5") if cfg["threadsafe"]: threads.Require(env) if cfg["zlib"]: if excons.GetArgument("zlib-static", None) is None: if not quiet: excons.PrintOnce("Force static zlib", tool="hdf5") excons.SetArgument("zlib-static", 1) zlib.Require(env) if cfg["szip"]: if excons.GetArgument("szip-static", None) is None: if not quiet: excons.PrintOnce("Force static szip", tool="hdf5") excons.SetArgument("szip-static", 1) szip.Require(env)
def Require(env): arnoldinc, arnoldlib = excons.GetDirs( "arnold", libdirname=("bin" if sys.platform != "win32" else "lib")) if arnoldinc: env.Append(CPPPATH=[arnoldinc]) if arnoldlib: env.Append(LIBPATH=[arnoldlib]) aver = Version(asString=False) if aver[0] >= 5: if sys.platform == "win32": if float(excons.mscver) < 14: excons.WarnOnce( "Arnold 5 and above require Visual Studio 2015 or newer (mscver 14.0)" ) if aver[0] >= 6: if sys.platform != "win32": if not excons.GetArgument("use-c++11", 0, int): excons.SetArgument("use-c++11", 1) if not "-std=c++11" in " ".join(env["CXXFLAGS"]): env.Append(CXXFLAGS=" -std=c++11") env.Append(LIBS=["ai"]) excons.AddHelpOptions(arnold=GetOptionsString())
def Require(env): nukespec = excons.GetArgument("with-nuke") if nukespec is None: excons.WarnOnce("Please set Nuke version or directory using with-nuke=", tool="nuke") return idn = ("Contents/MacOS/include" if sys.platform == "darwin" else "include") ldn = ("Contents/MacOS" if sys.platform == "darwin" else "") if os.path.isdir(nukespec): if sys.platform == "darwin": bn = os.path.basename(nukespec) _, ext = os.path.splitext(bn) if ext != ".app": nukespec += "/%s.app" % bn excons.SetArgument("with-nuke", nukespec) ndkinc, ndklib = excons.GetDirs("nuke", incdirname=idn, libdirname=ldn, libdirarch="none") else: if not re.match(r"\d+\.\d+v\d+", nukespec): excons.WarnOnce("Invalid Nuke version format: \"%s\"" % nukespec, tool="nuke") return if sys.platform == "win32": ndkbase = "C:/Program Files/Nuke%s" % nukespec elif sys.platform == "darwin": ndkbase = "/Applications/Nuke%s/Nuke%s.app" % (nukespec, nukespec) else: ndkbase = "/usr/local/Nuke%s" % nukespec ndkinc = "%s/%s" % (ndkbase, idn) ndklib = "%s/%s" % (ndkbase, ldn) if ldn else ndkbase if ndkinc: env.Append(CPPPATH=[ndkinc]) if ndklib: env.Append(LIBPATH=[ndklib]) if sys.platform == "darwin": #env.Append(CCFLAGS=" -isysroot /Developer/SDKs/MacOSX10.4u.sdk") #env.Append(LINKFLAGS=" -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk") #env.Append(LINKFLAGS=" -framework QuartzCore -framework IOKit -framework CoreFoundation -framework Carbon -framework ApplicationServices -framework OpenGL -framework AGL -framework Quicktime") pass env.Append(DEFINES=["USE_GLEW"]) if sys.platform != "win32": env.Append(CCFLAGS=" -Wno-unused-variable -Wno-unused-parameter") env.Append(LIBS=["DDImage", "GLEW"]) else: env.Append(LIBS=["DDImage", "glew32"])
def SetupMscver(): if sys.platform == "win32": excons.InitGlobals() mscver = excons.GetArgument("mscver", None) if mscver is None: houver = Version(full=False) if houver is not None: mscver = _hou_mscver.get(houver, None) if mscver is not None: print("Using msvc %s" % mscver) excons.SetArgument("mscver", mscver)
def SetupMscver(): if sys.platform == "win32": excons.InitGlobals() mscver = excons.GetArgument("mscver", None) if mscver is None: mayaver = Version(nice=True) if mayaver is not None: mscver = _maya_mscver.get(mayaver, None) if mscver is not None: print("Using msvc %s" % mscver) excons.SetArgument("mscver", mscver)
def SetupGccver(): if sys.platform.startswith("linux"): excons.InitGlobals() # bypass the arguments cache by using ARGUMENTS rather than # calling excons.GetArgument gccver = SCons.Script.ARGUMENTS.get("devtoolset", None) if gccver is None: mayaver = Version(full=False) if mayaver is not None: gccver = _hou_gccver.get(mayaver, "") if gccver is not None: print("Using gcc %s" % excons.devtoolset.GetGCCFullVer(gccver)) excons.SetArgument("devtoolset", gccver)
def SetupMscver(): if sys.platform == "win32": excons.InitGlobals() # bypass the arguments cache by using ARGUMENTS rather than # calling excons.GetArgument mscver = SCons.Script.ARGUMENTS.get("mscver", None) if mscver is None: mayaver = Version(nice=True) if mayaver is not None: mscver = _maya_mscver.get(mayaver, None) if mscver is not None: print("Using msvc %s" % mscver) excons.SetArgument("mscver", mscver)
def _RealRequire(env): global ThreadSafe_exp, Szlib_exp, Zlib_exp, hdf5_confs hdf5_inc, hdf5_lib = excons.GetDirs("hdf5") if hdf5_inc: env.Append(CPPPATH=[hdf5_inc]) if hdf5_lib: env.Append(LIBPATH=[hdf5_lib]) hdf5_libname = excons.GetArgument("hdf5-libname", None) if not hdf5_libname: hdf5_libsuffix = excons.GetArgument("hdf5-libsuffix", "") hdf5_basename = ("hdf5" if sys.platform != "win32" else "libhdf5") hdf5_libname = hdf5_basename + hdf5_libsuffix hdf5hl_libname = hdf5_basename + "_hl" + hdf5_libsuffix else: hdf5hl_libname = hdf5_libname + "_hl" if hl: env.Append(LIBS=[hdf5hl_libname, hdf5_libname]) else: env.Append(LIBS=[hdf5_libname]) hdf5_static = (excons.GetArgument("hdf5-static", 0, int) != 0) hdf5_threadsafe = False hdf5_szip = False hdf5_zlib = False h5conf = None if hdf5_inc: # Note: On Fedora 14, H5pubconf.h has been renamed to H5pubconf-64.h # -> be slightly more flexible when looking up this file lst = filter(lambda x: os.path.basename(x).startswith("H5pubconf"), glob.glob(hdf5_inc + "/*.h")) if len(lst) > 0: h5conf = lst[0].replace("\\", "/") else: # Look in current include paths for d in env["CPPPATH"]: lst = filter( lambda x: os.path.basename(x).startswith("H5pubconf"), glob.glob(d + "/*.h")) if len(lst) > 0: h5conf = lst[0].replace("\\", "/") break quiet = not verbose if h5conf: if h5conf in hdf5_confs: hdf5_threadsafe = hdf5_confs[h5conf]["threadsafe"] hdf5_zlib = hdf5_confs[h5conf]["zlib"] hdf5_szip = hdf5_confs[h5conf]["szip"] quiet = True else: if verbose: excons.PrintOnce("Reading configuration header '%s'..." % h5conf, tool="hdf5") f = open(h5conf, "r") for l in f.readlines(): l = l.strip() if ThreadSafe_exp.match(l): hdf5_threadsafe = True elif Szip_exp.match(l): hdf5_szip = True elif Zlib_exp.match(l): hdf5_zlib = True hdf5_confs[h5conf] = { "threadsafe": hdf5_threadsafe, "zlib": hdf5_zlib, "szip": hdf5_szip } f.close() if not quiet: if hdf5_threadsafe: excons.PrintOnce("Thread safe", tool="hdf5") if hdf5_zlib: excons.PrintOnce("Using zlib", tool="hdf5") if hdf5_szip: excons.PrintOnce("Using szip", tool="hdf5") else: excons.WarnOnce("Could not find configuration header", tool="hdf5") if hdf5_static: if not quiet: excons.PrintOnce("Static build", tool="hdf5") if hdf5_threadsafe: threads.Require(env) if hdf5_zlib: if excons.GetArgument("zlib-static", None) is None: if not quiet: excons.PrintOnce("Force static zlib", tool="hdf5") excons.SetArgument("zlib-static", 1) zlib.Require(env) if hdf5_szip: szip_static = excons.GetArgument("szip-static", None) if szip_static is None: if not quiet: excons.PrintOnce("Force static szip", tool="hdf5") excons.SetArgument("szip-static", 1) szip.Require(env)