Search code examples
cmakezipcpack

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


Solution

  • 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