On Sat, Dec 20, 2008 at 3:09 AM, Brad Aisa <[email protected]> wrote:
> I would like to create a target that will copy (or link) a big whack of > include files defined in my project to a local /include folder. (They start > life in a bunch of subfolders, and some of them are generated > programmatically during the build.) Note that we already have an > install-time process, what I want is to copy (or freshen, or link) all these > include files automatically, as the last step in the build. I have the files > in lists, ex. ta_HEADS css_HEADS etc. Thanks! > If you want to "install" these files as last step of build process, then this should be part of build process, not the install one. It is strange, requirement, but you can meet it. To make this part of build process, you can use custom command to set proper dependencies between source and destination file. To copy file, you can use cmake itself in 'command' mode. Next, you should create custom target which depends on all destination files (and optionally excluded from default build process) to run whole mechanism at build time. (Of course, you should write macros/foreach for this purpose) Alternatively you can put all your headers into separate (may be in addition to default ones) component and create custom target which runs cmake to process install script (see how cmake does this itself). The drawback of this approach, is that this target will always be run (but cmake still checks whether source and destination files are different) during build process. > _______________________________________________ > CMake mailing list > [email protected] > http://www.cmake.org/mailman/listinfo/cmake >
_______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
