[CMake] Installing files: modification dates, directory trees

Jaroslav Snajdr jsnajdr at kerio.com
Sun Mar 20 09:53:51 EST 2005


Hello,

I have two issues with using CMake in my project:

1. On Mac OS X, it is necessary to run ranlib on a static library 
(lib*.a). The ranlib process inserts a timestamp into the *.a file, and 
if the file is later copied to another location, the modification time 
of the file is changed and later linker complains that the table of 
contents of the archive is out of date, because of timestamp mismatch. 
The solution is either to not change the modification time when 
installing the library (cp -p), or rerun ranlib after the copy. The cp 
-p solution is obviously better. CMake doesn't do either thing though, 
so the INSTALL_TARGETS result is broken for static libraries. Any 
remedy to that?

2. I have a directory tree of auxiliary files in my project I need to 
copy to the destination, i.e. copy the whole directory tree to the 
destination without any change. However, the INSTALL_FILES command can 
only install files in a single directory. Is there any way to solve 
this problem without creating a CMakeLists.txt file in each and every 
directory and changing the SUBDIRS line every time I add or remove a 
directory from the tree?

Jaroslav Snajdr
Kerio Technologies




More information about the CMake mailing list