<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">Le mar. 23 oct. 2018 à 12:06, Craig Scott <<a href="mailto:craig.scott@crascit.com">craig.scott@crascit.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 23, 2018 at 4:43 PM Eric Noulard <<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">Le lun. 22 oct. 2018 à 23:05, Craig Scott <<a href="mailto:craig.scott@crascit.com" target="_blank">craig.scott@crascit.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br></div><div>Yes I agree that having build rpath is useful.</div><div>I am not aware of any mechanism that enable calling some tool during CPack's install step.</div><div>Moreover I don't use MacOS at all so I don't have any experience with PackageMaker.</div><div><br></div><div>May be some Mac user may shed some more light on this.</div></div></div></blockquote><div><br></div><div>You should be able to do this using install(SCRIPT) or install(CODE), invoking the code signing through execute_process() as part of that script/code.</div></div></div></blockquote><div><br></div><div>I wasn't sure of that. </div><div><br></div><div>So just to be clear  do we know for sure that install(SCRIPT) install(CODE) will run after the CMake builtin-generated install scripts?</div><div>The builtin generated install script for target includes stripping, so for signing to work as expect we should be sure of the execution order?</div><div>Or may be you suggest not to install(TARGET) for the concerned target and write install(SCRIPT) replacement for those?</div></div></div></blockquote></div><div><br></div><div>My understanding is that install() commands are generally processed in the order in which they appear in the directory scope. It is unspecified how the order between directory scopes behaves, although <a href="https://gitlab.kitware.com/cmake/cmake/merge_requests/2434" target="_blank">this merge request</a> (now merged to master) makes things much more predictable.</div><div><br></div><div>I missed the earlier detail about when stripping occurred in relation to installing. From what I can see, I think the stripping happens right after the executable is copied/installed. Have a look at the generated cmake_install.cmake file for one of your builds and search for CMAKE_INSTALL_DO_STRIP to see how things get processed. If you add your own install(CODE) or install(SCRIPT) calls after you've done the install(TARGETS) calls, I would expect them to come after the stripping, but I haven't tested this.</div></div></blockquote><div><br></div><div>I'll have a look, not that I need it but I'd like to know.</div><div>Thank you Craig.</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div></div>