I have a cmake project where multiple users may run “make install” (using the same build folder) at different times. This has worked great for us until recently, when we added an install(DIRECTORY …). The problem with install(DIRECTORY …) is it always tries to set permissions on the installed directory, which is a problem since anyone other than the original person who ran “make install” doesn’t own the directory.
There doesn’t appear to be a way around cmake trying to set permissions on the installed directory. One option would be to just do this with a custom install(CODE ) and just copy the directory to the install folder manually. This works great, but the downside is the directory is no longer a part of the install manifest.
Therefore, I’m curious if:
- There is a way to skip setting permissions on the installed directories that I’ve missed.
- There is a way to instruct cmake to add something to the install manifest that was added with install(CODE ).