[CMake] how broken is the RPM support?

Eric Noulard eric.noulard at gmail.com
Wed Oct 10 16:32:28 EDT 2007


2007/10/10, kent williams <nkwmailinglists at gmail.com>:
> I just installed the CVS CMake.  There is a CPackRPM.cmake file in the
> Modules directory, but it's not clear to me how to tell CPack I want
> to generate an RPM, or a Source RPM.

If you want to tell CPack to generate RPM you should either:

1) Add RPM generator to the list of CPack generator
    in your CMakeLists.txt

    SET(CPACK_GENERATOR "TGZ;RPM")
    INCLUDE(CPack)

   Then make package will build both TGZ and RPM.

2) or Invoke cpack command manually like:
    cpack -G RPM [-C CPackConfig.cmake]

    You could check package generator built-in CPack using
    cpack --help.

>
> Anyone have any clues for me?

More info on current CPack RPM support and limitations here:
http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#RPM
and included links.

The main limitation of current CPack RPM support is that it can
only build binary RPM.
If you need to build source RPM you may use UseRPMTools.cmake
see:
http://www.cmake.org/Wiki/CMakeUserUseRPMTools

-- 
Erk


More information about the CMake mailing list