#!/usr/bin/make -f
# SPDX-License-Identifier: LGPL-2.0-or-later
# SPDX-FileCopyrightText: 2023 Jonathan Riddell <jr@jriddell.org>

QT6_CMAKE_ARGS = -DBUILD_QT5=OFF -DBUILD_QT6=ON
QT5_CMAKE_ARGS = -DBUILD_QT5=ON -DBUILD_QT6=OFF

%:
	dh $@ --with kf6 --buildsystem kf6

execute_after_dh_auto_clean:
	rm -rf build-QT5

override_dh_auto_configure:
	dh_auto_configure --builddirectory=build-QT5 -- $(QT5_CMAKE_ARGS) -DUSE_QT_VERSION=5
	dh_auto_configure -- $(QT6_CMAKE_ARGS) -DUSE_QT_VERSION=6

override_dh_auto_build:
	dh_auto_build --builddirectory=build-QT5
	dh_auto_build

override_dh_install:
	dh_auto_install --builddirectory=build-QT5
	dh_install

