INSTALL_FILES -> INSTALL transition?

Dmitry Suzdalev dimsuz at gmail.com
Wed Jun 7 13:51:28 CEST 2006


Hello, buildsystem-ers! ;)

As stated in CMake's doc, INSTALL_FILES command is deprecated in
favour of INSTALL( FILES ... DESTINATION ...) command.

So the following code

INSTALL_FILES( ${DATA_INSTALL_DIR}/some_dir files_to_install )

should be replaced with

INSTALL( FILES files_to_install DESTINATION ${DATA_INSTALL_DIR}/some_dir )

Well, we have a problem here:

${DATA_INSTALL_DIR} contains "/share/apps".

It is fine as long as INSTALL_FILES is used, but INSTALL works
correctly only if its DESTINATION argument _doesn't_ begin with "/"
(i.e. it must be share/apps), or it will try to install to root
directory "/share/apps".
I.e., if INSTALL command sees a "/" in dest-path, it won't prepend
${CMAKE_INSTALL_PREFIX} to it.

The question is:
Is it planned to replace deprecated INSTALL_FILES with INSTALL in
CMakeLists.txt?
If yes, then ${DATA_INSTALL_DIR} needs to be modified to not include
the leading "/".

Rather global change :).

Thoughts?

Dmitry.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-buildsystem/attachments/20060607/dc5dd245/attachment.html 


More information about the Kde-buildsystem mailing list