[cmake-developers] [CMake 0014978]: cpack excludes empty directories with archive generators (and others?)

Mantis Bug Tracker mantis at public.kitware.com
Tue Jun 17 18:08:05 EDT 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://cmake.org/Bug/view.php?id=14978 
====================================================================== 
Reported By:                Clinton Stimpson
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14978
Category:                   CPack
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-06-17 18:08 EDT
Last Modified:              2014-06-17 18:08 EDT
====================================================================== 
Summary:                    cpack excludes empty directories with archive
generators (and others?)
Description: 
Empty directories are not included in cpack generated archives/installers.

Steps to Reproduce: 
project(archive)

set(CMAKE_INSTALL_BINARY_DIR bin)
set(CPACK_PACKAGE_CONTACT me)
set(CPACK_PACKAGING_INSTALL_PREFIX /opt/me)

install(CODE
  "
  file(MAKE_DIRECTORY
\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINARY_DIR}/userfiles)
  if(WIN32)
    execute_process(COMMAND icacls
\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINARY_DIR}/userfiles
/grant:r \"Users:(OI)(CI)(F)\")
  else()
    execute_process(COMMAND chmod ugo+rw
\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINARY_DIR}/userfiles)
  endif()
  "
)

include(CPack)


=========


Run cmake, then cpack -G TGZ or ZIP.  Open the archive, and you will see that
the directory is not included.

It is included for RPM, Deb and NSIS.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-06-17 18:08 Clinton StimpsonNew Issue                                    
======================================================================



More information about the cmake-developers mailing list