diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-27 17:04:03 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-27 17:04:03 +0200 |
commit | 5ea91859f1673d044874e3b84aa014f152436164 (patch) | |
tree | ab2fb6e5ef2b91e12097a6253d782ac8380c07ec /build | |
parent | 836505963ca50989357cb58dcf1850f166446e66 (diff) |
Update Qt import stub
Diffstat (limited to 'build')
-rwxr-xr-x | build/import/libqt/configure | 38 | ||||
-rw-r--r-- | 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) |