It's nice I can run the binary without setting LD_LIBRARY_PATH, but the debugger doesn't like it. When debugging some-exec, I can't autocomplete any symbols from the lib, and I can't set breakpoints there. If gdb somehow stops within a frame in libsomething, the symbols become available and I can debug normally.
In qt-creator it's even worse, there my breakpoints end up in all the wrong places and I can't get the program to stop inside the libsomething in a controlled manner.
So how do I tell cmake not to produce one huge mess of a binary? I've tried setting NO_SONAME to 1, but that doesn't change anything. Also, why doesn't cmake just use DT_RUNPATH=$ORIGIN?