[CMake] How to INSTALL generated files
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Mon Dec 4 11:04:42 EST 2006
On 2006-12-04 15:07+0100 Eric Noulard wrote:
> The remaining part of the problem is the 'install' part of it.
> Since CMake INSTALL command are processed during CMake run time
> (and not build time) but my build process generates files (doxygen
> produced files).
> Those files won't be installed since
> CMake may well not be re-runned after the file are generated.
>
> The CMake code used for installing files is the following:
> FILE(GLOB_RECURSE doc_files RELATIVE ${APIDOC_DIR} ${APIDOC_DIR}/*)
> FOREACH(file ${doc_files})
> GET_FILENAME_COMPONENT(file_prefix ${file} PATH)
> INSTALL(FILES ${APIDOC_DIR}/${file}
> DESTINATION doc/${file_prefix})
> ENDFOREACH(file)
>
> So the remaining question is:
>
> How to properly INSTALL files which are generated during build time
> BUT without knowing IN ADVANCE the name of the files you want to install.
> In the doxygen generated files case, I don't know the exact names of the
> list (may be huge) of files that will be generated.
Have a look at INSTALL(SCRIPT ....) in the documentation. I am not that
familiar with it, but I suspect it will work exactly like you want if you
specify the above script.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
More information about the CMake
mailing list