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.
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.
----------------------------------------
Best regards, Anatoly Belyaev
On 22.10.2018 11:55, Eric Noulard wrote:
Le lun. 22 oct. 2018 à 10:21, Anatoly Belyaev <[email protected]
<mailto:[email protected]>> a écrit :
We use CMake
|add_custom_command(TARGET POST_BUILD COMMAND codesign ...) |
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?
As you discovered CPack runs at a different moment than CMake (see:
https://github.com/dev-cafe/cmake-cookbook/blob/master/figures/cmake-times/cmake-times.jpg)
RPATH is rewritten because you may have different build and install RPATH.
https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling.
Concerning the strip part I'm not sure CPack does that. May be the
CPack generator specific tool does it?
I bet there is no generic way to that without extending CPack or the
particular generator ou are using.
What CPack generator(s) do you use?
--
Eric
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake