mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Also work without pkg-config, for example mac doesn't have it by default
This commit is contained in:
parent
cc5c7cad5d
commit
fb3988eb09
@ -922,8 +922,6 @@ def GetLdCache():
|
|||||||
|
|
||||||
def PkgEnable(pkg, pkgconfig = None, libs = None, incs = None, defs = None, framework = None, tool = "pkg-config"):
|
def PkgEnable(pkg, pkgconfig = None, libs = None, incs = None, defs = None, framework = None, tool = "pkg-config"):
|
||||||
global PKG_LIST_ALL
|
global PKG_LIST_ALL
|
||||||
if (LocateBinary("pkg-config")==None):
|
|
||||||
exit("Failed to locate pkg-config binary!")
|
|
||||||
if (pkgconfig == ""):
|
if (pkgconfig == ""):
|
||||||
pkgconfig = None
|
pkgconfig = None
|
||||||
if (framework == ""):
|
if (framework == ""):
|
||||||
@ -974,7 +972,7 @@ def PkgEnable(pkg, pkgconfig = None, libs = None, incs = None, defs = None, fram
|
|||||||
else:
|
else:
|
||||||
print "%ERROR:%s Could not locate framework %s, aborting build" % (GetColor("red"), GetColor(), framework)
|
print "%ERROR:%s Could not locate framework %s, aborting build" % (GetColor("red"), GetColor(), framework)
|
||||||
exit()
|
exit()
|
||||||
elif (pkgconfig != None):
|
elif (LocateBinary("pkg-config") != None and pkgconfig != None):
|
||||||
if (isinstance(pkgconfig, str)):
|
if (isinstance(pkgconfig, str)):
|
||||||
if (PkgConfigHavePkg(pkgconfig, tool)):
|
if (PkgConfigHavePkg(pkgconfig, tool)):
|
||||||
return PkgConfigEnable(pkg, pkgconfig, tool)
|
return PkgConfigEnable(pkg, pkgconfig, tool)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user