[CMake] CPack does not generate a RPM

Kristian kristianonline28 at gmail.com
Wed Apr 6 18:50:48 EDT 2016


Hi,

I have an error and I do not know, how to solve this error.

I have an archive, where are some files. I want to generate a rpm
package with the files, which are in that archive. So first, I extract
that archive with a bash script. After that, the script calls "cpack
-G RPM -V ." for this CMakeLists.txt:

cmake_minimum_required(VERSION 3.5)
project(project1)

install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/usr/bin/calculator DESTINATION bin)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/usr/lib64/* DESTINATION lib)

set(CPACK_GENERATOR "RPM")
set(CPACK_PACKAGE_VERSION_MAJOR 1)
set(CPACK_PACKAGE_VERSION_MINOR 2)
set(CPACK_PACKAGE_NAME "project1")
set(CPACK_RPM_PACKAGE_NAME "project1")
set(CPACK_RPM_PACKAGE_SUMMARY "Some random calculator")
set(CPACK_RPM_PACKAGE_ARCHITECTURE x86_64)
set(CPACK_PACKAGE_VENDOR "Vendor Coorp.")
set(CPACK_RPM_PACKAGE_MAINTAINER "Vendor Coorp.")

INCLUDE(CPack)

But calling the cpack command, I always getting the error "CPack
project name not specified". Why is that? What I am missing?


More information about the CMake mailing list