Michael Aigner
Michael Aigner

Reputation: 5180

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

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

Upvotes: 4

Views: 1634

Answers (1)

Michael Aigner
Michael Aigner

Reputation: 5180

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

Upvotes: 10

Related Questions