#!/bin/sh
# Build and run a small program against all four installed libraries, using
# the CMake package configuration files shipped in libdfm6-dev.
set -eu

WORKDIR="${AUTOPKGTEST_TMP:-$(mktemp -d)}"
cp -a debian/tests/cmake-build.d/* "${WORKDIR}/"
cd "${WORKDIR}"

# -Wno-dev silences a CMP0167 warning raised by dfm6-searchConfig.cmake.
cmake -Wno-dev -S . -B build
cmake --build build
./build/dfm-smoke-test
