[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:25:34 UTC 2015


On Sat, Sep 12, 2015 at 1:21 AM, Andrew Kelley <superjoe30 at gmail.com> wrote:

> 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.
>

I figured out the problem. The CMakeLists.txt called
include(GNUInstallDirs) before project(). Moving the
include(GNUInstallDirs) to after the project() line solved the issue.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-cmake-team/attachments/20150912/f992b5dc/attachment.html>


More information about the Pkg-cmake-team mailing list