mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
makepanda: Fix LocateLibrary to also work on Windows
This commit is contained in:
parent
e9c97535f7
commit
1da5b4ceb7
@ -1640,7 +1640,10 @@ def LocateLibrary(lib, lpath=[], prefer_static=False):
|
||||
return os.path.join(dir, 'lib%s.a' % lib)
|
||||
|
||||
for dir in lpath:
|
||||
if target == 'darwin' and os.path.isfile(os.path.join(dir, 'lib%s.dylib' % lib)):
|
||||
if target == 'windows':
|
||||
if os.path.isfile(os.path.join(dir, lib + '.lib')):
|
||||
return os.path.join(dir, lib + '.lib')
|
||||
elif target == 'darwin' and os.path.isfile(os.path.join(dir, 'lib%s.dylib' % lib)):
|
||||
return os.path.join(dir, 'lib%s.dylib' % lib)
|
||||
elif target != 'darwin' and os.path.isfile(os.path.join(dir, 'lib%s.so' % lib)):
|
||||
return os.path.join(dir, 'lib%s.so' % lib)
|
||||
|
Loading…
x
Reference in New Issue
Block a user