<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 7 oct. 2019 à 16:49, Cornelis Bockemühl <<a href="mailto:cornelis@bockemuehl.ch">cornelis@bockemuehl.ch</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks to both you and J Decker: I would say that this is still the part that I understood! So basically the word "install" in cmake language could be replaced by "copy" more or less in common human language - right?<br></blockquote><div><br></div><div>Nope I oversimplified.</div><div>This is not a bare copy, e.g. the runtime path (a.k.a. RPATH or RUNPATH) is updated as well.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">But then, if it is about "installing" a "target", which is libraries in my case, I would expect the shared libraries to be copied - no?<br></blockquote><div><br></div><div>Yes the shared lib should be coped and its RPATH updated.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">And this is exactly what does not happen - for no obvious reason! Because some days ago it even happened in my project ONCE - and then not any more. But debugging is not easy because since that moment I changed many things, and basically the reason for my question is that I have no clear idea what EXACTLY should happen if I put a<br><br>install(TARGETS mylibrary)<br><br>into my CMakeLists.txt. Well, like you explained, and like what I also thought I had understood: nothing should happen during the configure and generate runs of cmake, and also not during the "ninja all" build run, but only during the "ninja install". or else cmake --build . --target install (which in turn calls ninja in my case). Indeed I observed that it does a build for "all" first if the initial project is not up to date.<br><br>But then it tells me that it is successfully "installing" mylibrary, but I see no shared library appearing in the install tree! Or rather: it happened once, but not any more - and I should find out what is missing...<br></blockquote><div><br></div><div>.</div><div>Are building out-of-tree? (Are your source tree and build tree separate dir?)</div><div>If so, did you try removing the entire build tree and try again ?</div><div><br></div><div> </div><div>May be there is probably some mixup with your install DESTINATION in your install command.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>My current workaround is indeed that I am trying to avoid the install step altogether and build a crazy construction with configure_file stuff in order to get the libraries to the right place - and I know pretty well that this is NOT the way how things should be done properly. But I am afraid I will be ready with this workaround way faster than I will understand what is going on during this miraculous "install" process!</blockquote><div><br></div><div>Provide us with a stripped down non-working example and we may dig into it.</div><div>Otherwise it is very difficult to guess what is happening in your particular case. </div></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div></div>