aboutsummaryrefslogtreecommitdiff
path: root/build/import/libqt/configure
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-11-27 17:04:03 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-27 17:04:03 +0200
commit5ea91859f1673d044874e3b84aa014f152436164 (patch)
treeab2fb6e5ef2b91e12097a6253d782ac8380c07ec /build/import/libqt/configure
parent836505963ca50989357cb58dcf1850f166446e66 (diff)
Update Qt import stub
Diffstat (limited to 'build/import/libqt/configure')
-rwxr-xr-xbuild/import/libqt/configure38
1 files changed, 29 insertions, 9 deletions
diff --git a/build/import/libqt/configure b/build/import/libqt/configure
index 7d0987e..d9dd544 100755
--- a/build/import/libqt/configure
+++ b/build/import/libqt/configure
@@ -19,6 +19,14 @@ $echo "Configuring external dependency on 'Qt libraries' for '$project_name'."
$echo
$echo
+$echo "Which version of Qt would you like to use?"
+$echo
+$echo "(1) Qt5"
+$echo "(2) Qt4"
+$echo
+version=`read_option "5 4" "5"`
+
+$echo
$echo "Would you like to configure dependency on the installed version"
$echo "of 'Qt libraries' as opposed to the development build?"
$echo
@@ -43,17 +51,24 @@ if [ "$installed" = "n" ]; then
type=`read_option "archive shared" "shared"`
else
- if pkg-config --exists QtCore; then
+ core_libs=
+ if [ "$version" = "5" ]; then
- core_cppflags=`pkg-config --cflags QtCore`
- core_libs=`pkg-config --libs QtCore`
+ if pkg-config --exists Qt5Core; then
+ core_cppflags=`pkg-config --cflags Qt5Core`
+ core_libs=`pkg-config --libs Qt5Core`
+ fi
- elif pkg-config --exists Qt5Core; then
+ else
- core_cppflags=`pkg-config --cflags Qt5Core`
- core_libs=`pkg-config --libs Qt5Core`
+ if pkg-config --exists QtCore; then
+ core_cppflags=`pkg-config --cflags QtCore`
+ core_libs=`pkg-config --libs QtCore`
+ fi
- else
+ fi
+
+ if [ "$core_libs" = "" ]; then
$echo
$echo "Unable to discover installed 'Qt libraries' using pkg-config."
@@ -61,13 +76,18 @@ else
$echo
core_cppflags=
- core_libs=-lQtCore
+ if [ "$version" = "5" ]; then
+ core_libs=-lQt5Core
+ else
+ core_libs=-lQtCore
+ fi
fi
fi
-echo libqt_installed := $installed >$1
+echo libqt_version := $version >$1
+echo libqt_installed := $installed >>$1
if [ "$installed" = "n" ]; then
echo libqt_root := $root >>$1