Let me explain the problem. I have a C-code where a search path for additional plugins is included in a C-string. As long as the Program stays in the build directory of cmake the string should include the plugin folder inside the the build directory. For example
char *plugindir = "/home/.../myproject/build/plugins:/usr/share/myproject/plugins";
If the program gets installed via make install
I want to change this string to
char *plugindir = "/usr/share/myproject/plugins";
and recompile/relink the program before it gets installed. How can this behaviour be realized using CMAKE?