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 | a3e75f46dc4ba74bd9c4b55a776a1c051e00b4ec (patch) | |
tree | d240cfa88d505f8b160cb84887d72cdf7e4ab2bc /build/import/libqt/configure | |
parent | c11a0e411d62db6f2ad4153579af254081a0e6f0 (diff) |
Update Qt import stub
Diffstat (limited to 'build/import/libqt/configure')
-rwxr-xr-x | build/import/libqt/configure | 38 |
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 |