[CMake] Why does CMake use relative linking when I replace a shared object?

2011-11-25 Thread Mathias Gaunard
There is some strange CMake behaviour I don't quite understand. In the project attached, I build a shared library for which I want to specify a custom build command; to do this I generate a dummy library which I then replace by another file in a POST_BUILD command (alternatives involving

Re: [CMake] Why does CMake use relative linking when I replace a shared object?

2011-11-25 Thread Michael Hertling
On 11/25/2011 12:28 PM, Mathias Gaunard wrote: There is some strange CMake behaviour I don't quite understand. In the project attached, I build a shared library for which I want to specify a custom build command; to do this I generate a dummy library which I then replace by another file in

Re: [CMake] Why does CMake use relative linking when I replace a shared object?

2011-11-25 Thread Mathias Gaunard
On 11/25/2011 07:19 PM, Michael Hertling wrote: That's caused by the absence of an SONAME in your baz/libtest.so. If there's no DT_SONAME tag in a shared library you are linking against, the linker will write a DT_NEEDED tag to the resulting binary which points to the library as it has been

Re: [CMake] Why does CMake use relative linking when I replace a shared object?

2011-11-25 Thread Michael Hertling
On 11/25/2011 08:42 PM, Mathias Gaunard wrote: On 11/25/2011 07:19 PM, Michael Hertling wrote: That's caused by the absence of an SONAME in your baz/libtest.so. If there's no DT_SONAME tag in a shared library you are linking against, the linker will write a DT_NEEDED tag to the resulting