aboutsummaryrefslogtreecommitdiff
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
commitad7c6ccd31f437e8b6ad68476f5f2ff53586d2e5 (patch)
tree669da7a85e12aeb4d6ece468db09a618e9502667
parentedce177c1e2204b43c9522cdef267aff09e7693d (diff)
Update Qt import stub
-rwxr-xr-xbuild/import/libqt/configure38
-rw-r--r--build/import/libqt/core/stub.make1
2 files changed, 30 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
diff --git a/build/import/libqt/core/stub.make b/build/import/libqt/core/stub.make
index f45a596..06d4a9c 100644
--- a/build/import/libqt/core/stub.make
+++ b/build/import/libqt/core/stub.make
@@ -4,6 +4,7 @@
$(call include-once,$(scf_root)/import/libqt/configuration-rules.make,$(dcf_root))
+libqt_version :=
libqt_installed :=
$(call -include,$(dcf_root)/import/libqt/configuration-dynamic.make)