[CMake] Rename files during installation

Filipe Sousa filipe at ipb.pt
Mon Apr 10 07:57:13 EDT 2006


On Monday 10 April 2006 10:35, Michael Biebl wrote:
> Hi,
>
> I have two text files in one directory:
> test.foo
> test.bar
> test.foo has to be installed as /dir/foo/test (test is the file name)
> and test.bar to /dir/bar/test (test is the file name)
> This means that both files have to be renamed during install. How can
> I do that with INSTALL_FILES? It should run with CMake 2.2.

For 2.2 you should use 
  SET_TARGET_PROPERTIES(target 
     PROPERTIES POST_INSTALL_SCRIPT your_install_script.cmake)

Use ${CMAKE_COMMAND} -E copy file destination in your custom install script

If you were using cmake from cvs you could use the new INSTALL command that 
supports RENAME.

-- 
Filipe Sousa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20060410/2d14c4f0/attachment.pgp


More information about the CMake mailing list