blob: fa564cd795b7c09d671764d89d38acc6a577e7f7 [file] [log] [blame]
Masahiro Yamada0b669a52018-05-22 16:22:19 +09001#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3
4PKG="Qt5Core Qt5Gui Qt5Widgets"
Masahiro Yamada0b669a52018-05-22 16:22:19 +09005
Masahiro Yamadafd65465b2018-08-31 18:34:55 +09006if [ -z "$(command -v pkg-config)" ]; then
7 echo >&2 "*"
8 echo >&2 "* 'make xconfig' requires 'pkg-config'. Please install it."
9 echo >&2 "*"
10 exit 1
11fi
12
Masahiro Yamada0b669a52018-05-22 16:22:19 +090013if pkg-config --exists $PKG; then
Masahiro Yamada7cd01582020-10-24 21:38:40 +090014 echo cflags=\"-std=c++11 -fPIC $(pkg-config --cflags $PKG)\"
Masahiro Yamada0b669a52018-05-22 16:22:19 +090015 echo libs=\"$(pkg-config --libs $PKG)\"
16 echo moc=\"$(pkg-config --variable=host_bins Qt5Core)/moc\"
17 exit 0
18fi
19
Masahiro Yamada0b669a52018-05-22 16:22:19 +090020echo >&2 "*"
Masahiro Yamada7b675642020-10-24 21:38:39 +090021echo >&2 "* Could not find Qt5 via pkg-config."
22echo >&2 "* Please install Qt5 and make sure it's in PKG_CONFIG_PATH"
Masahiro Yamada0b669a52018-05-22 16:22:19 +090023echo >&2 "*"
24exit 1