Shared library for stand-alone executable

I was trying to do something similar previously & resorted to making the binary + libswipl.so (+ some other shared libraries) & started the binary with a script that set LD_LIBRARY_PATH to point to where those .so’s live. I would very like to have a better solution as well…