Adapt CMakeLists.txt to the way CPack actually works
According to the comment[1] of the CMake developer, it is necessary to
explicitly set CMAKE_PACKAGIN_INSTALL_PREFIX.
[1]
@@ -71,6 +71,10 @@ else()
set(PACKAGE_DEB ON)
endif()
+if(NOT CPACK_PACKAGING_INSTALL_PREFIX)
+ set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+endif()
+
set(CPACK_GENERATORS)
if (PACKAGE_TGZ)
list(APPEND CPACK_GENERATORS "TGZ")
