In trying to install oxDNA system-wide on a few computers (one Debian, one ArchLinux),
When linking, cmake sets a fixed, absolute RPATH to the build/src/ directory, wherever that is at the time of building, in the oxDNA executables. As a result, they will not be able to find libcommon.so (or libcommon-debug.so) if the build directory is later moved, or is inaccessible to the user (eg, if it's in another user's home directory). The RPATH could simply be removed, and libcommon.so placed in a directory on the system's library path, but in that case, the name of the library is not well-suited to a system library directory like /usr/lib.
Would you consider changing the name of libcommon.so to something like liboxdna_common.so? I've experimented with doing this on my AUR package for oxdna, and it seems to work. I'd be happy to create a PR for this if it would be helpful.
I expect that most users are not doing system-wide installations of oxDNA, and this is why cmake is not set up to install everything itself; an alternative here would be to set that up, but just renaming the library seems to be enough to let me package everything simply without changing the build process.
In trying to install oxDNA system-wide on a few computers (one Debian, one ArchLinux),
When linking, cmake sets a fixed, absolute RPATH to the
build/src/
directory, wherever that is at the time of building, in the oxDNA executables. As a result, they will not be able to find libcommon.so (or libcommon-debug.so) if the build directory is later moved, or is inaccessible to the user (eg, if it's in another user's home directory). The RPATH could simply be removed, and libcommon.so placed in a directory on the system's library path, but in that case, the name of the library is not well-suited to a system library directory like /usr/lib.Would you consider changing the name of libcommon.so to something like liboxdna_common.so? I've experimented with doing this on my AUR package for oxdna, and it seems to work. I'd be happy to create a PR for this if it would be helpful.
I expect that most users are not doing system-wide installations of oxDNA, and this is why cmake is not set up to install everything itself; an alternative here would be to set that up, but just renaming the library seems to be enough to let me package everything simply without changing the build process.