[CMake] Dependency on CONFIGURE_FILE output

Patrick Noffke Patrick.Noffke at adpro.com.au
Tue Jul 11 22:06:47 EDT 2006



> -----Original Message-----
> From: cmake-bounces+patrick.noffke=adpro.com.au at cmake.org
> [mailto:cmake-bounces+patrick.noffke=adpro.com.au at cmake.org]On
>  Behalf Of
> Alexander Neundorf
> Sent: Tuesday, 11 July 2006 4:21 PM
> To: Patrick Noffke; cmake at cmake.org
> Subject: Re: [CMake] Dependency on CONFIGURE_FILE output
> 
> 
> -------- Original-Nachricht --------
> Datum: Tue, 11 Jul 2006 12:45:16 +0930
> Von: Patrick Noffke <Patrick.Noffke at adpro.com.au>
> An: cmake at cmake.org
> Betreff: [CMake] Dependency on CONFIGURE_FILE output
> 
> > How do I create a dependency on the output of a 
> CONFIGURE_FILE operation? 
> > I tried adding the output file as a dependency to a custom 
> command, but if
> > I remove only the generated output file after a successful 
> build, then run
> > nmake again, I get an error "don't know how to make <output 
> file name>". 
> > If I do a clean build, then the file is generated.
> 
> Configure_file() is executed when cmake runs, not during build time.
> 
> (it would be nice if one would be able to give 
> add_custom_command/target()) a bunch of cmake code to be 
> executed at build time)
> 
> 

Indeed, I use CONFIGURE_FILE() to replace paths to tools and source files in an XML file.  I'm using WiX to make a windows installer package, and this required an XML file to describe the project.  I need to package things like Qt DLLs, my applications translation files, and other components whose paths I do not know until build time.

Is there a better way to solve such a problem on Windows?

Regards,
Patrick


More information about the CMake mailing list