[CMake] RPM for CPack?
Eric Noulard
eric.noulard at gmail.com
Fri Aug 3 09:10:29 EDT 2007
2007/8/3, Christian Convey <christian.convey at gmail.com>:
> On 8/2/07, Eric Noulard <eric.noulard at gmail.com> wrote:
> > If you have trouble with the macro do not hesitate to ask for
> > explanation and/or send patched version either on the list or the wiki
>
> Thanks. Could you explain something to me?
>
> It looks to me like you're supposed to be in the top-level directory
> of a directory tree populated by CMake, right? That is, the directory
> "x" in the following example:
>
> mkdir x
> cd x
> ccmake ../my-project-src
> cmake
Yes this is what I expect to have.
After that you should be able to do:
make <PackageName>_rpm
or
make <PackageName>_srpm
you may check that it has worked properly by:
1) verifying the output of cmake which should show something like:
-- RPMTools:: Using RPM_ROOTDIR=/home/eric/TSP/builds/tsp_oncrpc/RPM
-- Configuring spec file
</home/eric/TSP/tsp_all/tsp/src/scripts/tsp.spec.in> -->
</home/eric/TSP/build s/tsp_oncrpc/RPM/SPECS/tsp.spec>
with appropriate used PATHNAME replaced by yours.
>
> And then it looks to me like your UseRPMTools invokes cpack, telling
> cpack to use a file with this name: CPackSourceConfig.cmake And any
> files that would have been installed via "make install" will end up in
> the resulting .rpm file.
Yes that right.
UseRPMTools adds 2 new make target.
Can you check what is the output of
make help
called in the buid tree root dir?
>
> But when I do this, I don't find any files named
> CPackSourceConfig.cmake in my build directory ('x').
Did you
INCLUDE(CPack) in your root CMakeLists.txt ?
If yes could you send me the output of cmake ?
>
> Do I properly understand your macro?
In order to give you a more accurate answer I need to
see you CMakeLists.txt which does the
INCLUDE(UseRPMTools)
> And if so, any idea why I'm not
> seeing any CPackSourceConfig.cmake files in my build tree?
Most probably you did not
INCLUDE(CPack)
BEFORE
INCLUDE(UseRPMTools)
--
Erk
More information about the CMake
mailing list