<html>Dear all those wo answered on this thread: many thanks first of all!<br /><br />When I was starting this thread I was really a bit desperate - because things did not do what I expected, I felt like in the middle of a "cmake jungle" - and I doubted everything that I ever meant to have understood about cmake, mostly regarding that "install" and "export" business...<br /><br />The first thing I learned was thus one first certainty about the entire install process: "install" is indeed kind of "copy with a plus". Already very good to know to start with!<br /><br />Then there was the question if I could provide a strip down version of my project - and my problem was that "stripping down Paraview" is not so simple...<br /><br />However, I went back to one of my "teachers" - which is this web page -, and started to build a really extremely trivial example that includes the following points:<br /><br />- a first shared library "shlibbi" that has an exported header, uses an internal class and boost::regex - to have something "completely external".<br />- a second shared library "shlibbu" that depends on "shlibbi"<br />- and finally an "example" that depends on "shlibbu"<br /><br />And indeed - it works! At least in the sense that I can<br /><br />- build and "install" first "shlibbi"<br />- then build and "install" "shlibbu", importing "shiibbi" with a find_package(shlibbi...) call<br />- and finally build "example", importing "shlibbu" again with find_package(shlibbu...) and assuming that it would take care of "shlibbi" automatically<br /><br />And if I start now example, it does what it is supposed to do! At least if I do it inside the QtCreator that I am using as my development environment. And it does so even if the copy process that I would have expected did STILL not happen - like in my initial problem that was drving me mad.<br /><br />What I thought SHOULD happen is: if I "import" shlibbi into shlibbu, then "installing" shlibbu should also bring libshlibbi.so into the target library directory. And finally, if I "install" also the "example" main project, I would expect also both libshlibbi.so and libshlibbu.so in some location inside the install directory tree of "example".<br /><br />Instead, all the 3 binaries (shlibbi.so, shlibbu.so and example) remain in their "install" target trees. And "somehow" within QtCreator, the shared libraries are found if I start example. However, if I open a terminal in in the .../example/release/install/bin folder and type ./example there, it only complains about not finding libshlibbu.so.<br /><br />And if I manually copy libshlibbi.so and libshlibbu.so to that directory, I am STILL getting that same error message: it does not find the two libraries<br /><br />patchelf --set-rpath '$ORIGIN/.' example<br />patchelf --set-rpath '$ORIGIN/.' libshlibbu.so<br /><br />Only if I added a RPATH to both example and libshlibbu.so, the start from the terminal also succeeded in the install target (bin) directory.<br /><br />So my initially very unspecific (and a bit desperate...) question is now much more precise: How can I get the *.so shared libraries into the same directory as the example (or else in a "parallel" lib64 library) - together with the correct RPATH settings? Because this I also learned from your answers: part of the "copy plus" is handling the RPATH properly!<br /><br />And this time I also have a stripped down example that does almost nothing (add 3 + 1) in a relatively complicated way (that even includes some regex pattern matching...)<br /><br />Thanks and regards,<br />Cornelis</html>