[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packaging with CMake



On Mon, Oct 6, 2008 at 4:11 PM, Laurent Léonard <laurent@open-minds.org> wrote:

> Could you give me a sample rules file with cmake calls ?
>
> I put the cmake call in the "build-stamp" section, but when I use
> dpkg-builpackage it try to do a "make clean" before executing cmake... If I
> delete the "make clean" call the deb package is correctly generated but I
> have some problems to get clean sources again. What can I do in the "clean"
> section to clean the files generated by cmake ?
>
> Or perhaps I should execute cmake in the "configure-stamp" section ?

cmake does not have a proper clean target in the unix makefiles in
generates, which is a pain. Or not one that cleans as you would fully
expect. It does keep its working files in the current directory so a
the way i have done this is to do something like :-

for the main build :-

mkdir build
cd build
cmake _DSOMEFLAGS:BOOL=true..............

then the clean rule can just purge "build/"

this produces working debs and keeps the orig.tar.gz clean too.

This does seem a little dirty which makes me think i'm not quite doing
it right though so if anyone has a better way to do this?, but it does
work.

Regards Robin


Reply to: