mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
support for thirdparty packages with their own Python bindings
This commit is contained in:
parent
72af325f2b
commit
4cc8cf04c8
@ -2145,13 +2145,18 @@ ConditionalWriteFile(GetOutputDir()+"/etc/Confauto.prc", confautoprc)
|
|||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
||||||
for pkg in PkgListGet():
|
for pkg in PkgListGet():
|
||||||
if (PkgSkip(pkg)==0):
|
if (PkgSkip(pkg)!=0):
|
||||||
if (COMPILER == "MSVC"):
|
continue
|
||||||
if (os.path.exists(GetThirdpartyDir()+pkg.lower()+"/bin")):
|
if (COMPILER == "MSVC"):
|
||||||
CopyAllFiles(GetOutputDir()+"/bin/",GetThirdpartyDir()+pkg.lower()+"/bin/")
|
if (os.path.exists(GetThirdpartyDir()+pkg.lower()+"/bin")):
|
||||||
if (COMPILER == "LINUX"):
|
CopyAllFiles(GetOutputDir()+"/bin/",GetThirdpartyDir()+pkg.lower()+"/bin/")
|
||||||
if (os.path.exists(GetThirdpartyDir()+pkg.lower()+"/lib")):
|
if (PkgSkip("PYTHON")==0 and os.path.exists(GetThirdpartyDir()+pkg.lower()+"/bin/"+SDK["PYTHONVERSION"])):
|
||||||
CopyAllFiles(GetOutputDir()+"/lib/",GetThirdpartyDir()+pkg.lower()+"/lib/")
|
CopyAllFiles(GetOutputDir()+"/bin/",GetThirdpartyDir()+pkg.lower()+"/bin/"+SDK["PYTHONVERSION"]+"/")
|
||||||
|
if (COMPILER == "LINUX"):
|
||||||
|
if (os.path.exists(GetThirdpartyDir()+pkg.lower()+"/lib")):
|
||||||
|
CopyAllFiles(GetOutputDir()+"/lib/",GetThirdpartyDir()+pkg.lower()+"/lib/")
|
||||||
|
if (PkgSkip("PYTHON")==0 and os.path.exists(GetThirdpartyDir()+pkg.lower()+"/lib/"+SDK["PYTHONVERSION"])):
|
||||||
|
CopyAllFiles(GetOutputDir()+"/lib/",GetThirdpartyDir()+pkg.lower()+"/lib/"+SDK["PYTHONVERSION"]+"/")
|
||||||
|
|
||||||
if (COMPILER=="MSVC"):
|
if (COMPILER=="MSVC"):
|
||||||
CopyAllFiles(GetOutputDir()+"/bin/", GetThirdpartyDir()+"extras"+"/bin/")
|
CopyAllFiles(GetOutputDir()+"/bin/", GetThirdpartyDir()+"extras"+"/bin/")
|
||||||
|
@ -1185,6 +1185,9 @@ def SmartPkgEnable(pkg, pkgconfig = None, libs = None, incs = None, defs = None,
|
|||||||
if (os.path.isdir(GetThirdpartyDir() + pkg.lower())):
|
if (os.path.isdir(GetThirdpartyDir() + pkg.lower())):
|
||||||
IncDirectory(target_pkg, GetThirdpartyDir() + pkg.lower() + "/include")
|
IncDirectory(target_pkg, GetThirdpartyDir() + pkg.lower() + "/include")
|
||||||
LibDirectory(target_pkg, GetThirdpartyDir() + pkg.lower() + "/lib")
|
LibDirectory(target_pkg, GetThirdpartyDir() + pkg.lower() + "/lib")
|
||||||
|
if (PkgSkip("PYTHON") == 0):
|
||||||
|
LibDirectory(target_pkg, GetThirdpartyDir() + pkg.lower() + "/lib/" + SDK["PYTHONVERSION"])
|
||||||
|
|
||||||
# TODO: check for a .pc file in the lib/pkg-config/ dir
|
# TODO: check for a .pc file in the lib/pkg-config/ dir
|
||||||
if (tool != None and os.path.isfile(GetThirdpartyDir() + pkg.lower() + "/bin/" + tool)):
|
if (tool != None and os.path.isfile(GetThirdpartyDir() + pkg.lower() + "/bin/" + tool)):
|
||||||
tool = GetThirdpartyDir() + pkg.lower() + "/bin/" + tool
|
tool = GetThirdpartyDir() + pkg.lower() + "/bin/" + tool
|
||||||
@ -1193,6 +1196,7 @@ def SmartPkgEnable(pkg, pkgconfig = None, libs = None, incs = None, defs = None,
|
|||||||
for i, j in PkgConfigGetDefSymbols(None, tool).items():
|
for i, j in PkgConfigGetDefSymbols(None, tool).items():
|
||||||
DefSymbol(target_pkg, i, j)
|
DefSymbol(target_pkg, i, j)
|
||||||
return
|
return
|
||||||
|
|
||||||
for l in libs:
|
for l in libs:
|
||||||
libname = l
|
libname = l
|
||||||
if (l.startswith("lib")):
|
if (l.startswith("lib")):
|
||||||
@ -1202,6 +1206,7 @@ def SmartPkgEnable(pkg, pkgconfig = None, libs = None, incs = None, defs = None,
|
|||||||
len(glob.glob(GetThirdpartyDir() + pkg.lower() + "/lib/lib%s.*" % libname)) == 0):
|
len(glob.glob(GetThirdpartyDir() + pkg.lower() + "/lib/lib%s.*" % libname)) == 0):
|
||||||
libname = "panda" + libname
|
libname = "panda" + libname
|
||||||
LibName(target_pkg, "-l" + libname)
|
LibName(target_pkg, "-l" + libname)
|
||||||
|
|
||||||
for d, v in defs.values():
|
for d, v in defs.values():
|
||||||
DefSymbol(target_pkg, d, v)
|
DefSymbol(target_pkg, d, v)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user