[CMake] CMake/CPack 2.8.4 - Windows - Can't package files as read-only?

Eric Noulard eric.noulard at gmail.com
Thu Apr 28 14:46:09 EDT 2011


2011/4/28 Alan Garny <alan.garny at dpag.ox.ac.uk>:
> Hi, I am using CMake/CPack (version 2.8.4) for my project and everything
> works fine except for a couple of files that I am trying to package on
> Windows. I would like those files to be read-only. I currently have
> something like:
>
> INSTALL(FILES ${CMAKE_SOURCE_DIR}/myFile DESTINATION myDestination
> PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
>
> and it works perfectly fine on Linux and Mac OS X, but not on Windows (using
> either ZIP or NSIS). Any idea why this would be the case? Just for testing
> purposes, I also tried

Is it working with ZIP on Linux or MacOS as well?

> INSTALL(FILES ${CMAKE_SOURCE_DIR}/myFile DESTINATION myDestination)
>
> since the files are originally read-only, but to no avail.

What happen (on Windows) if you execute the INSTALL target?
Do the installed files have the appropriate rights?

Could you try to build a sample project which exhibit the problem
open a bug report and attach the sample project to it ?

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list