[CMake] Permissions for new folders and files

Брюков Юрий y.brukov at gmail.com
Thu Aug 7 10:01:33 EDT 2008


Hi.
  I try to write installation steps for my application. I need create some
folders and copy some files to this folders. I use next commands:
    install(TARGETS myApp DESTINATION . PERMISSIONS WORLD_READ WORLD_WRITE
WORLD_EXECUTE)
    install(FILES myFile DESTINATION myfolder)

  I have troubles with permissions of directories which were created during
my application installation. Command `make install` should be executed with
root privileges because I need to copy some libraries to /usr/lib/. But in
this case all necessary folders also will be created with root permissions
and my application can't create any files in this folders if it was executed
without root privileges. For example folder from CMAKE_INSTALL_PREFIX
variable also created with root privileges. And myApp try to create some log
files in this directory and it failed because it hasn't necessary
privileges.
  Have you any advance?

Thanks,
Yuri.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080807/785c5184/attachment-0001.htm>


More information about the CMake mailing list