Use the location of the running cmake to find cpack, and use the CMAKE_CONFIG_TYPE environtment variable as a type for cpack.
Use the location of the running cmake to find cpack, and use the CMAKE_CONFIG_TYPE environtment variable as a type for cpack.