Packaging in form of tar.gz archives or .zip on Windows
1)If you're using "generic" Unix build with makefiles
2)On Windows, using "Visual Studio" generator
devenv mysql.sln /build relwithdebinfo /project package
On Windows, current versions of CMake (2.8 and later) do not need any external tools to generate ZIP, with CMake 2.6 however 7Zip or Winzip must be installed and 7z.exe rsp winzip.exe need to be in the PATH.
Another way to build packages is calling cpack executable directly like
cpack -G TGZ --config CPackConfig.cmake
(-G TGZ is for tar.gz generator, there is also -GZIP)