Prologue : I'm an idiot for this in the documentation
CMake-2.8.10.2
How do you create cmake to retain the original file permissions when installing the directory? For this project, I would like it to essentially copy some directories from my source tree to the installation tree. To wit:
install( DIRECTORY config runp DESTINATION ${CMAKE_INSTALL_PREFIX} PATTERN ".svn" EXCLUDE PATTERN ".git" EXCLUDE PATTERN "start_collection.snl" EXCLUDE )
Everything works as expected, except that executable scripts are copied with incorrect file permissions. In fact, none of the original file permissions is preserved. Setting permissions globally using FILE_PERMISSIONS and DIRECTORY_PERMISSIONS is what I don't want to do, and frankly, it will be a hack in this context.
In the world of shell scripts, I would do something simple:
for i in config runp ; do tar cf - $i | tar -C $CMAKE_INSTALL_PREFIX -xf - done
smcdow
source share