cpack -G deb not working even though I set maintainer's name

– Build files have been written to: /root/dev-learn/build-tools/cmake-tutorial/Tutorial-new/build
CPack: Create package using DEB
CPack: Install projects
CPack: - Run preinstall target for: Tutorial
CPack: - Install project: Tutorial []
CPack: Create package
– CPACK_DEBIAN_PACKAGE_DEPENDS not set, the package will have no dependencies.
CMake Error at /usr/local/share/cmake-3.16/Modules/Internal/CPack/CPackDeb.cmake:494 (message):
CPackDeb: Debian package requires a maintainer for a package, set
CPACK_PACKAGE_CONTACT or CPACK_DEBIAN_PACKAGE_MAINTAINER
Call Stack (most recent call first):
/usr/local/share/cmake-3.16/Modules/Internal/CPack/CPackDeb.cmake:764 (cpack_deb_prepare_package_vars)

I later added to my CMakeLists.txt following but still errors out:

include(InstallRequiredSystemLibraries)
set(CPACK_RESOURCE_FILE_LICENSE “${CMAKE_CURRENT_SOURCE_DIR}/License.txt”)
set(CPACK_PACKAGE_VERSION_MAJOR “${Tutorial_VERSION_MAJOR}”)
set(CPACK_PACKAGE_VERSION_MINOR “${Tutorial_VERSION_MINOR}”)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER, “GG”)
set(CPACK_PACKAGE_CONTACT, “GG”)
include(CPack)

there is a typo with the extra “comma” between the variable name and the value.

1 Like

Thanks that got it working!!