In case when installation is done into a stage directory instructions like this fail to install files.
Custom commands can't properly install files.
The reason is that the stage directory is only given to the cmake backend (either GNU make or Ninja) as the DESTDIR environment variable. This value isn't known at the cmake time, so such instructions can't possibly install files into proper destinations under the stage directory.
Proposed solution: Custom commands should build files in the build directory. Then cmake's install commands should be used to install such files into proper destinations under the stage directory.
In case when installation is done into a stage directory instructions like this fail to install files.
Custom commands can't properly install files.
The reason is that the stage directory is only given to the cmake backend (either GNU make or Ninja) as the
DESTDIR
environment variable. This value isn't known at the cmake time, so such instructions can't possibly install files into proper destinations under the stage directory.Proposed solution: Custom commands should build files in the build directory. Then cmake's
install
commands should be used to install such files into proper destinations under the stage directory.