<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>We use "PackageMaker" generator on MacOS. But i don't think it
is CPack specific tool does call strip command. The code for
RPATH rewrite and strip cmd is located in cmake_install.cmake. As
i understand CPack calls make install to tmp dir and then creates
package.</p>
<p> Having different RPATH for build tree is useful. May be there is
a way to call sign tool in the install stage? But reading the doc
to CMake install command, doesn't help me find solution for this.
<br>
</p>
<div class="moz-signature">----------------------------------------
<br>
Best regards, Anatoly Belyaev<br>
<br>
<br>
</div>
<div class="moz-cite-prefix">On 22.10.2018 11:55, Eric Noulard
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAPASGLopm9zNpyQN0NQ19boYtON_P-79u+_hQ6QEbqokx=P2Qg@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr"><br>
<br>
<div class="gmail_quote">
<div dir="ltr">Le lun. 22 oct. 2018 à 10:21, Anatoly
Belyaev <<a href="mailto:cross@cryptopro.ru"
moz-do-not-send="true">cross@cryptopro.ru</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">
<div bgcolor="#FFFFFF">
<p>We use CMake</p>
<pre style="margin:0px 0px 1em;padding:5px;border:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-weight:400;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-size:13px;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;background-color:rgb(239,240,241);color:rgb(36,39,41);letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-size:13px;vertical-align:baseline;box-sizing:inherit;background-color:rgb(239,240,241);white-space:inherit">add_custom_command(TARGET POST_BUILD COMMAND codesign ...)
</code></pre>
<p>for signing executable files on build. It works
fine, but when CPack generates package it rewrites
rpath on executable files and call strip command on
them. This changes the file and invalidates the
signature. Is there any way in CMake to sign binary
files after CPack finishes install and before actual
packaging? <br>
</p>
</div>
</blockquote>
<div>As you discovered CPack runs at a different moment
than CMake (see: <a
href="https://github.com/dev-cafe/cmake-cookbook/blob/master/figures/cmake-times/cmake-times.jpg"
moz-do-not-send="true">https://github.com/dev-cafe/cmake-cookbook/blob/master/figures/cmake-times/cmake-times.jpg</a>)<br>
</div>
<div><br>
</div>
<div>RPATH is rewritten because you may have different
build and install RPATH.</div>
<div><a
href="https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling"
moz-do-not-send="true">https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling</a>.<br>
</div>
<div><br>
</div>
<div>Concerning the strip part I'm not sure CPack does
that. May be the CPack generator specific tool does it?</div>
<div>I bet there is no generic way to that without
extending CPack or the particular generator ou are
using.</div>
<div>What CPack generator(s) do you use?</div>
<div><br>
</div>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>Eric<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>