[CMake] How to force CMake install / CPack to create an empty directory.

Eric Noulard eric.noulard at gmail.com
Wed Jan 4 09:02:44 EST 2012


2012/1/4 Vladimir Jaksic <vladimir.jaksic at gmail.com>:
> Hello,
>
> For the purposes of my project i need to create multiple empty
> directories where my exectuable is located, and I would like to
> include these directories in the .zip file. I have tried the
> following:
>
> ------------------
> ...
> INSTALL(TARGETS myproject DESTINATION .)
>
> INSTALL(DIRECTORY DESTINATION directory) - nothing happends
>
> SET(CPACK_GENERATOR "ZIP")
>
> INCLUDE(CPack)
> -------------------
>
> but i cannot stick the empty directory inside, only way around i found
> was creating a dummy file. Is there any other way to to do this?
> Instruction here
> http://www.lcfg.org/doc/buildtools/cmake_recipes.html
> says to do exactly what i did, but it still did not work, has this
> changed in newer cmake versions?
> Is it still possible to do it?

Looks like an unresolved, but nevertheless known, bug:
http://public.kitware.com/Bug/view.php?id=8767

Note however that the problem seems to be with all Archive generators:
STGZ  TBZ2  TGZ   TZ    ZIP

e.g. DEB and RPM do include the empty.

This means that the empty dir is installed (in local CPack temp dir)
but not packaged.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list