From 7a690bb07110f50791e66a8daeef4d4bedc2a2a9 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 4 Nov 2024 13:26:29 +0100 Subject: [PATCH] makepanda: Link libmpdec.a et al in emscripten even with custom libdir --- makepanda/makepanda.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index f7fdb3b29f..ccaca23d39 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -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")