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

Vladimir Jaksic vladimir.jaksic at gmail.com
Thu Jan 5 03:40:43 EST 2012


Hi,

thanks for the help!

Vlado

On Thu, Jan 5, 2012 at 5:53 AM, Fraser Hutchison
<fraser.hutchison at googlemail.com> wrote:
> Hi there,
>
> This looks like a single line deletion will fix it.  I've added a note to
> the issue here: http://public.kitware.com/Bug/view.php?id=8767#c28187 - it's
> probably not worth a patch :-)
>
> Cheers,
>
> Fraser.
>
>
>
>
> On 04/01/2012 14:02, Eric Noulard wrote:
>>
>> 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.
>>
>


More information about the CMake mailing list