[CMake] CPack ZIP generator: is there a way to avoid a root directory named ${CPACK_PACKAGE_FILE_NAME} in the zip?
Eric Noulard
eric.noulard at gmail.com
Mon Feb 13 18:32:36 EST 2012
2012/2/13 Massaro Alessio <Alessio.Massaro at mediobanca.co.uk>:
> Hi there
>
>
>
> The CPack ZIP generator seems to always put all “installed” files in a
> directory called ${CPACK_PACKAGE_FILE_NAME}
>
> So, if ${CPACK_PACKAGE_FILE_NAME}==”xyz”, the zip file will have one single
> “xyz” directory at the root, with all “installed” files placed therein.
>
>
>
> Does anyone know if there’s a way to switch off this behavior and have
> everything zipped at the root of the zip file? (so no “xyz” directory
> containing everything)
try
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
it should do what you want.
PS: you can try on the command line as well
cpack -D CPACK_INCLUDE_TOPLEVEL_DIRECTORY=0 -G ZIP
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CMake
mailing list