Installing data files

Alexander Neundorf neundorf at kde.org
Sun May 30 18:40:42 CEST 2010


On Thursday 27 May 2010, John Layt wrote:
...
> I was thinking I could delete the already installed files each time before
> the new set is installed, which seems slightly dodgy to me:
>
> file(GLOB _oldfiles ${DATA_INSTALL_DIR}/libkholidays/plan1/holiday_*)
> if(_oldfiles)
>     file(REMOVE ${_oldfiles})
> endif(_oldfiles)
>
> Again, is this an acceptable thing to do, or is there a better way?

Do you mean to have this code simply in the CMakeLists.txt, so it is executed 
at cmake time ?
You don't know whether you have the permissions to do this, the install 
location may be root-only writable.

Or do you mean do use this with install(SCRIPT ...) ?

Alex


More information about the Kde-buildsystem mailing list