This works, albeit it's built exactly with runpath (or rpath, not sure...) /home/<user>/zmusic_build/source, as shown by command:
Code: Select all
readelf -d gzdoom_build/gzdoom | grep -i runpath
Code: Select all
error while loading shared libraries: libzmusic.so.1: cannot open shared object file: No such file or directory
It seemingly worked. Now GZDoom can be run even if moving entire gzdoom_build directory anywhere.
Now what I wanted to try asking is, can't this be done somehow since building time? Don't know, with some cmake options or the like... to make binary read all needed libraries from its current location, without the patchelf step.
Thanks for your help.