[CMake] [cpack] name of the top level directory

Eric Noulard eric.noulard at gmail.com
Wed May 20 14:11:01 EDT 2009


2009/5/20 Jaroslav Gresula <jgresula.LEAVE-THIS-OUT at gmail.com>:
>
> Hi,
>
> can CPack generate a package (zip, bz2) whose file name differs from the
> package top level directory name?
>
> For instance, when I set CPACK_PACKAGE_FILE_NAME to project-1.0.0.src,
> then the name of the package is project-1.0.0.src.tar.bz2 and the top
> level directory is project-1.0.0.src/. However, I want it to be
> project-1.0.0/.

Currently I don't know if you may "rename it" but at least you can suppress it:

SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)

> I couldn't find any CPack variable that would allow to specify the top
> level directory name. Any help would be appreciated.

Neither do I but you have a look to the source in order to have a
sharper idea :-)

CMake/Source/CPack/cmCPackGenerator.[h|cxx]   --> the root generator class
CMake/Source/CPack/cmCPackZIPGenerator.[h|cxx] --> the ZIP specialized class.


-- 
Erk


More information about the CMake mailing list