How to manually postprocess CMake target during installation?

Viewed 45

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?

0 Answers
Related