cmake and install file + group

William A. Hoffman billlist at nycap.rr.com
Mon Aug 14 16:06:01 CEST 2006


At 09:10 AM 8/11/2006, William A. Hoffman wrote:
>At 01:17 AM 8/11/2006, Laurent Montel wrote:
>>On Friday 11 August 2006 02:15, William A. Hoffman wrote:
>>> At 01:07 PM 8/10/2006, Laurent Montel wrote:
>>> >Hi,
>>> >What is the command if I want to install a file with specific group/user ?
>>>
>>> See the INSTALL command:
>>>
>>> http://www.cmake.org/HTML/Documentation.html
>>>
>>> ....
>>> PERMISSIONS arguments specify permissions for installed files. Valid
>>> permissions are OWNER_READ, OWNER_WRITE, OWNER_EXECUTE, GROUP_READ,
>>> GROUP_WRITE, GROUP_EXECUTE, WORLD_READ, WORLD_WRITE, WORLD_EXECUTE, SETUID,
>>> and SETGID. Permissions that do not make sense on certain platforms are
>>> ignored on those platforms. ....
>>
>>Yes I used it for changing properties of files but how change owner of files.
>>For example if I want to install a binary for group "sounds" ?
>
>Your right, you can not do that with the command.   I guess you would
>have to use a POST_INSTALL_SCRIPT, and put a feature request into the
>cmake bug tracker for this ability to be added to the INSTALL command.
>See SET_TARGET_PROPERTIES for information on POST_INSTALL_SCRIPT.

I take that back, you should use this:

You can use this as
The SCRIPT and CODE signature:

  INSTALL([[SCRIPT <file>] [CODE <code>]] [...])

The SCRIPT form will invoke the given CMake script files during installation. If the script file name is a relative path it will be interpreted with respect to the current source directory. The CODE form will invoke the given CMake code during installation. Code is specified as a single argument inside a double-quoted string. For example, the code

  INSTALL(CODE "MESSAGE(\"Sample install message.\")")

You can create a script that will call chgrp.

-Bill



More information about the Kde-buildsystem mailing list