blob: 117f36e568fc5e395f077db35c3be7cc19b3f6f3 [file] [log] [blame]
Patrick Georgi53ea1d42019-11-22 16:55:58 +01001#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3
Patrick Georgi7eab8ef2023-11-20 18:03:34 +01004cflags=$1
5libs=$2
6bin=$3
7
Patrick Georgi53ea1d42019-11-22 16:55:58 +01008PKG="Qt5Core Qt5Gui Qt5Widgets"
9
Patrick Georgi1215cc72022-10-28 01:00:26 +020010if [ -z "$(command -v ${HOSTPKG_CONFIG})" ]; then
Patrick Georgi53ea1d42019-11-22 16:55:58 +010011 echo >&2 "*"
Patrick Georgi1215cc72022-10-28 01:00:26 +020012 echo >&2 "* 'make xconfig' requires '${HOSTPKG_CONFIG}'. Please install it."
Patrick Georgi53ea1d42019-11-22 16:55:58 +010013 echo >&2 "*"
14 exit 1
15fi
16
Patrick Georgi1215cc72022-10-28 01:00:26 +020017if ${HOSTPKG_CONFIG} --exists $PKG; then
Patrick Georgi7eab8ef2023-11-20 18:03:34 +010018 ${HOSTPKG_CONFIG} --cflags ${PKG} > ${cflags}
19 ${HOSTPKG_CONFIG} --libs ${PKG} > ${libs}
20 ${HOSTPKG_CONFIG} --variable=host_bins Qt5Core > ${bin}
Patrick Georgi53ea1d42019-11-22 16:55:58 +010021 exit 0
22fi
23
24echo >&2 "*"
Patrick Georgi1215cc72022-10-28 01:00:26 +020025echo >&2 "* Could not find Qt5 via ${HOSTPKG_CONFIG}."
Patrick Georgi53ea1d42019-11-22 16:55:58 +010026echo >&2 "* Please install Qt5 and make sure it's in PKG_CONFIG_PATH"
Patrick Georgiaa8796d2022-10-28 01:00:26 +020027echo >&2 "* You need $PKG"
Patrick Georgi53ea1d42019-11-22 16:55:58 +010028echo >&2 "*"
29exit 1