During installation, regular makefile-based install *and* dh-cmake install happens
I'm looking to implement dh-cmake in my package, and in my first attempt I see that the installation process is done twice. First, the regular (cmake-generated) makefile-based install happens (which installs into debian/tmp), then the dh-cmake install happens (which installs into package-specific subdirectories as specified).
Here's an excerpt from my build log showing this:
dh_auto_install -O--buildsystem=cmake
cd obj-x86_64-linux-gnu && make -j8 install DESTDIR=/build/openttd-12.1/debian/tmp AM_UPDATE_INFO_DIR=no "INSTALL=install --strip-program=true"
make[1]: Entering directory '/build/openttd-12.1/obj-x86_64-linux-gnu'
/usr/bin/cmake -S/build/openttd-12.1 -B/build/openttd-12.1/obj-x86_64-linux-gnu --check-build-system CMakeFiles/Makefile.cmake 0
make -f CMakeFiles/Makefile2 preinstall
make[2]: Entering directory '/build/openttd-12.1/obj-x86_64-linux-gnu'
make[2]: Nothing to be done for 'preinstall'.
make[2]: Leaving directory '/build/openttd-12.1/obj-x86_64-linux-gnu'
Install the project...
/usr/bin/cmake -P cmake_install.cmake
-- Install configuration: "RelWithDebInfo"
-- Installing: /build/openttd-12.1/debian/tmp/usr/games/openttd
-- Installing: /build/openttd-12.1/debian/tmp/usr/share/games/openttd/lang
[ ... snip ... ]
make[1]: Leaving directory '/build/openttd-12.1/obj-x86_64-linux-gnu'
dh_cmake_install -O--buildsystem=cmake
-- Install configuration: "RelWithDebInfo"
-- Installing: /build/openttd-12.1/debian/openttd/usr/games/openttd
-- Install configuration: "RelWithDebInfo"
-- Installing: /build/openttd-12.1/debian/openttd/usr/share/applications/openttd.desktop
[ ... snip ... ]
-- Install configuration: "RelWithDebInfo"
-- Installing: /build/openttd-12.1/debian/openttd-data/usr/share/games/openttd/lang
[ ... snip ... ]
dh_installdocs -O--buildsystem=cmake
dh_installchangelogs -O--buildsystem=cmake
dh_installman -O--buildsystem=cmake
Looking at the dh-cmake sequence, this can be expected, since it declares insert_after("dh_auto_install", "dh_cmake_install");
. Would it not be better to replace the regular buildsystem install instead?
It is probably not a big problem (it just runs an extra make install, throwing away the installed files later), but it would seem nicer to fix this?