[CMake] Generate and install a file

Kyle Edwards kyle.edwards at kitware.com
Thu Mar 28 16:58:13 EDT 2019


On Thu, 2019-03-28 at 16:38 -0400, Norton Allen wrote:
> Related to that, I noticed in another thread the mention of
> 'CMAKE_SKIP_INSTALL_ALL_DEPENDENCY'. If that were set in this case,
> how could I indicate that install depends on mygeneratedtarget? 

There is no way to do this. C/C++ targets (executables and libraries)
suffer from the same problem: if you set
CMAKE_SKIP_INSTALL_ALL_DEPENDENCY and then run "make install" without
running "make" first, the install rule will complain that it can't find
the files (such as libfoo.a.) If you set
CMAKE_SKIP_INSTALL_ALL_DEPENDENCY, you have to make sure the targets
you want to install are built before running "make install".

Kyle


More information about the CMake mailing list