Browse Source

makepanda: build Python libraries statically with --static

Fixes #477
rdb 7 years ago
parent
commit
cedd4172c4
1 changed files with 7 additions and 2 deletions
  1. 7 2
      makepanda/makepandacore.py

+ 7 - 2
makepanda/makepandacore.py

@@ -3362,8 +3362,13 @@ def CalcLocation(fn, ipath):
 
 
 def FindLocation(fn, ipath, pyabi=None):
-    if (GetLinkAllStatic() and fn.endswith(".dll")):
-        fn = fn[:-4] + ".lib"
+    if GetLinkAllStatic():
+        if fn.endswith(".dll"):
+            fn = fn[:-4] + ".lib"
+        elif fn.endswith(".pyd"):
+            fn = "libpy.panda3d." \
+               + os.path.splitext(fn[:-4] + GetExtensionSuffix())[0] + ".lib"
+
     loc = CalcLocation(fn, ipath)
     base, ext = os.path.splitext(fn)