如何在安装过程中手动后处理CMAKE目标?

发布于 2025-01-26 21:07:20 字数 292 浏览 1 评论 0原文

我正在为提供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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文