build: move generation of config for cpack into GeneratePackage macro