Hey there. I am rewriting some build system for a larger project. Currently, we have multiple targets to install different components (install_lib, install_hdr, install_data, etc). We need this because we generate different packages from the same code (a projectname.deb, projectname-dev.deb, projectname-data.deb).
Currently, this is implemented as add_custom_targets. I’d like to change this to use the native CMake install() statements. However, by doing that, everything is installed by the single
install target — I can’t use that and separate them.
What is the best way to do this in CMake?