--- a/lib/wrappers/openssl.nim	2026-02-23 10:50:45.000000000 +0800
+++ b/lib/wrappers/openssl.nim	2026-03-16 18:41:21.000000000 +0800
@@ -49,8 +49,8 @@
 when sslVersion != "":
   when defined(macosx):
     const
-      DLLSSLName* = "libssl." & sslVersion & ".dylib"
-      DLLUtilName* = "libcrypto." & sslVersion & ".dylib"
+      DLLSSLName* = "@PREFIX@/lib/" & "libssl." & sslVersion & ".dylib"
+      DLLUtilName* = "@PREFIX@/lib/" & "libcrypto." & sslVersion & ".dylib"
     from std/posix import SocketHandle
   elif defined(windows):
     const
@@ -92,8 +92,8 @@
 
   when defined(macosx):
     const
-      DLLSSLName* = "libssl" & versions & ".dylib"
-      DLLUtilName* = "libcrypto" & versions & ".dylib"
+      DLLSSLName* = "@PREFIX@/lib/" & "libssl" & versions & ".dylib"
+      DLLUtilName* = "@PREFIX@/lib/" & "libcrypto" & versions & ".dylib"
   elif defined(genode):
     const
       DLLSSLName* = "libssl.lib.so"

--- a/lib/wrappers/pcre.nim	2026-02-23 10:50:45.000000000 +0800
+++ b/lib/wrappers/pcre.nim	2026-03-16 18:38:12.000000000 +0800
@@ -319,7 +319,7 @@
     else:
       const pcreDll = "pcre32.dll"
   elif hostOS == "macosx":
-    const pcreDll = "libpcre(.3|.1|).dylib"
+    const pcreDll = "@PREFIX@/lib/libpcre(.3|.1|).dylib"
   else:
     const pcreDll = "libpcre.so(.3|.1|)"
   {.push dynlib: pcreDll.}
