소스 검색

makepanda: Link libmpdec.a et al in emscripten even with custom libdir

rdb 1 년 전
부모
커밋
7a690bb071
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 4
      makepanda/makepanda.py

+ 7 - 4
makepanda/makepanda.py

@@ -1018,11 +1018,14 @@ if (COMPILER=="GCC"):
             # Python may have been compiled with these requirements.
             # Python may have been compiled with these requirements.
             # Is there a cleaner way to check this?
             # Is there a cleaner way to check this?
             LinkFlag("PYTHON", "-s USE_BZIP2=1 -s USE_SQLITE3=1")
             LinkFlag("PYTHON", "-s USE_BZIP2=1 -s USE_SQLITE3=1")
-            if not PkgHasCustomLocation("PYTHON"):
+            if PkgHasCustomLocation("PYTHON"):
+                python_libdir = FindLibDirectory("PYTHON")
+            else:
                 python_libdir = GetThirdpartyDir() + "python/lib"
                 python_libdir = GetThirdpartyDir() + "python/lib"
-                for lib in "libmpdec.a", "libexpat.a", "libHacl_Hash_SHA2.a":
-                    if os.path.isfile(python_libdir + "/" + lib):
-                        LibName("PYTHON", python_libdir + "/" + lib)
+
+            for lib in "libmpdec.a", "libexpat.a", "libHacl_Hash_SHA2.a":
+                if os.path.isfile(python_libdir + "/" + lib):
+                    LibName("PYTHON", python_libdir + "/" + lib)
 
 
         if GetTarget() == "linux":
         if GetTarget() == "linux":
             LibName("PYTHON", "-lutil")
             LibName("PYTHON", "-lutil")