Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMake/CPack: How to avoid top-level directory in zip files

Tags:

zip

cmake

cpack

I'm using cpack to create my zip file of my binaries. Everything works fine, but one thing is ugly. CPack always generate a top-level directory (with the name of the project and some other variables).

Does anybody know how i can tell cpack to get rid of this auto toplevel directory?

CMake: 3.4.x OS: Win7 x64

Thanks in advance
Tonka

like image 921
Michael Aigner Avatar asked Dec 25 '22 02:12

Michael Aigner


1 Answers

found the solution myself.

There is a CPACK_INCLUDE_TOPLEVEL_DIRECTORY variable.

If it is set to ...

  • ON (default) you will get a toplevel directory
  • OFF you will get no toplevel directory
like image 155
Michael Aigner Avatar answered Dec 28 '22 19:12

Michael Aigner