Alan W. Irwin wrote:
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 havingfile(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 copiesfiles 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 thanordinary cmake commands which are usually used to configure the system beforeany 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.
Actually, I'm pretty sure that the copying of files will happen at "make install" time. In any case, the alternative I really meant to suggest (which I use in my project) is:
file(GLOB USER_DOCS ${CMAKE_SOURCE_SIR}/doc/user/html/*)
install(FILES ${USER_DOCS} DESTINATION ${docdir}/html/user/html)
This doesn't use the undocumented file(INSTALL signature and will certainly work
as you want.
--Radu _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
