如何在安装过程中手动后处理CMAKE目标?
我正在为提供GDB漂亮打印机的图书馆工作。它们可以通过包括在生成的二进制中的部分。对于构建
内的二进制文件,我希望本节指向源树内的相当局限器。对于已安装的二进制文件,我只想剥离此特定部分,或者也安装了相当启动器,然后将引用更改为其已安装位置。
CMAKE中是否有内置功能或简单的解决方案来后处理已安装的二进制文件?
I am working on a library that provides gdb pretty-printers. They could be automatically located by including the .debug_gdb_scripts
section in the generated binary. For binaries inside build
, I would like this section to point to the pretty-printer inside the source tree. For installed binaries, I would like to either strip this specific section only, or install the pretty-printer as well and change the reference to its installed location.
Is there builtin functionality in CMake or a simple solution to postprocess the installed binary?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论