Boost logo

Boost Interest :

Subject: Re: [Boost-cmake] 1.40.0.cmake5 (?) builds cleanly
From: troy d. straszheim (troy_at_[hidden])
Date: 2009-11-03 09:34:03


Denis Arnaud wrote:
> 2. To instruct CMake about the installation directory, I currently use
> (http://denisarnaud.fedorapeople.org/boost/1.40.0/10/boost.spec) the
> "-DCMAKE_INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix}" directive (where
> %{_prefix} is equal to /usr). However, it has rpmlint (the RPM packaging
> checker utility) to complain/warn about it:
> $ rpmlint -i SPECS/boost.spec
> SPECS/boost.spec:257: W: rpm-buildroot-usage %build %cmake
> -DCMAKE_INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
> $RPM_BUILD_ROOT should not be touched during %build or %prep stage, as
> it may
> break short circuit builds."
>
> Also, the "standard Fedora way" (used by
> KDE4: https://fedoraproject.org/wiki/Packaging:Cmake#Specfile_Usage ?)
> is to instruct make (not cmake), like for VERBOSE=1, where to install
> everything, with "make install DESTDIR=$RPM_BUILD_ROOT".
>
> So, if possible, I'd suggest that the installation directory may be
> instructed at the installation stage, understood by make (and not only
> by cmake).
>

Looking back at this, AFAICT this will work fine:

   cmake ../src -DCMAKE_INSTALL_PREFIX=/usr
   DESTDIR=$RPM_BUILD_ROOT make install

does this give you problems?

-t


Boost-cmake list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk