On Sat, Sep 12, 2015 at 1:21 AM, Andrew Kelley <superjo...@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.