From ad7c6ccd31f437e8b6ad68476f5f2ff53586d2e5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 27 Nov 2016 17:04:03 +0200 Subject: Update Qt import stub --- build/import/libqt/configure | 38 +++++++++++++++++++++++++++++--------- build/import/libqt/core/stub.make | 1 + 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) -- cgit v1.1