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 imported libraries do not work properly across different scopes).

If I do not replace the library, then the executable correctly links against libtest.so. If I do, it links instead with ../baz/libtest.so (sic), which of course, fails when trying to run the program.

Why is it putting a relative path into my executable? Why is it different depending on whether I replace the .so by another one or not?

Thank you very much for any insight on what's happening.

Attachment: test.tar.gz
Description: GNU Zip compressed data

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to