[CMake] How to have build steps operate on files in a copied directory?

Michael Ellery mellery451 at gmail.com
Mon Jul 10 14:25:17 EDT 2017


> On Jul 10, 2017, at 11:19 AM, Christopher E Robison <cerobison at utexas.edu> wrote:
> 
> The INSTALL(SCRIPT ...) syntax might be just the answer I need, thanks!.  
> 
> As I mentioned, the index creating script in the custom step needs to operate on the copied directory tree in its final location, so if it's not all there yet it will fail.  So, if CMake has some distinction between "build" and "install"  (I'm familiar with Makefiles, where the syntax enforces no such separation -- just targets, dependencies, and commands), then this would mean the step has to be executed at the end of the "install" phase.
> 
> Can I specify somehow that this install command must be executed after the INSTALL(DIRECTORY ...) command has completed?
> 
> 
> Thanks,
> CR
> 
> 

I *believe* the install directives are executed in the order they are encountered in the processing of CMakeLists files, so putting the custom step as the last item in your top level CMake file might do the trick. 




More information about the CMake mailing list