[Pkg-cmake-team] Bug#798739: Bug#798739: cmake: GNUInstallDirs reports CMAKE_INSTALL_LIBDIR as "lib" instead of "lib/$triplet"

Andrew Kelley superjoe30 at gmail.com
Sat Sep 12 08:21:20 UTC 2015


On Sat, Sep 12, 2015 at 1:12 AM, Felix Geyer <fgeyer at debian.org> wrote:

> On 12.09.2015 09:13, Andrew Kelley wrote:
> > Package: cmake
> > Version: 3.2.2-2+b1
> > Severity: important
> >
> >
> > Here is a simple CMakeLists.txt file:
> >
> > include(GNUInstallDirs)
> > message("lib: ${CMAKE_INSTALL_LIBDIR}")
> >
> > It outputs: "lib: lib". No arch triplet.
> >
> > I also tested this with cmake from experimental, currently version
> > 3.3.1.
>
> % cmake -DCMAKE_INSTALL_PREFIX=/usr .
> lib: lib/x86_64-linux-gnu
> -- Configuring done
>
> cmake install to the multi-arch path only when the prefix is set to /usr.
>
> The git commit has some more information:
>
> https://github.com/Kitware/CMake/commit/620939e4e6f5a61cd5c0fac2704de4bfda0eb7ef
>

Thank you for the example. I am indeed able to reproduce this behavior.

Perhaps I should take this bug report to git-buildpackage. I see output
like this:

dh build
   dh_testdir
   dh_auto_configure
    cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_BUILD_TYPE=None
CMAKE_INSTALL_LIBDIR: lib

So it is indeed passing the -DCMAKE_INSTALL_PREFIX=/usr to cmake, and using
GNUInstallDirs, but somehow the ${CMAKE_INSTALL_LIBDIR} variable is "lib".

When I run the simple example outside of git buildpackage, I get the
expected "lib/$triplet" output.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-cmake-team/attachments/20150912/91471857/attachment.html>


More information about the Pkg-cmake-team mailing list