On 2007-01-31 17:06-0800 Radu Serban wrote:

Alan W. Irwin wrote:

install(
  CODE "
  file(GLOB USER_DOCS ${CMAKE_SOURCE_DIR}/doc/user/html/*) \n
  file(INSTALL DESTINATION ${docdir}/html/user/html
  TYPE FILE FILES \${USER_DOCS}
  )"
)
[snip]

Just out of curiosity, is there any reason/advantage to using the above versus simply having

file(GLOB USER_DOCS ${CMAKE_SOURCE_SIR}/doc/user/html/*)
file(INSTALL DESTINATION ${docdir}/html/user/html
 TYPE FILE FILES ${USER_DOCS})

I don't know for sure.

Remember, I just copied a pattern from other projects, and I haven't seen
the alternative pattern you suggest which might or might not work.
Currently, my best guess is "file(INSTALL" is a workhorse that simply copies
files at _cmake_ time.  The purpose of the "install(CODE ..." surrounding
all this is to make a rule that runs cmake commands when the user types
"make install" which, of course, happens at a quite different time than
ordinary cmake commands which are usually used to configure the system before
any make commands are executed.

Anyhow, all this uncertainty about the "file(INSTALL" pattern can be
eliminated if somebody familiar with how/why it is implemented will step
forward to document it for the first time.

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
__________________________
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to