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

This commit is contained in:
rdb 2024-11-04 13:26:29 +01:00
parent 7c74060035
commit 7a690bb071
1 changed files with 7 additions and 4 deletions

View File

@ -1018,11 +1018,14 @@ if (COMPILER=="GCC"):
# Python may have been compiled with these requirements.
# Is there a cleaner way to check this?
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"
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":
LibName("PYTHON", "-lutil")