Skip to content

Commit

Permalink
Fix Qt5 build (#17346)
Browse files Browse the repository at this point in the history
  • Loading branch information
viachaslavic authored Jan 5, 2025
1 parent 51c1482 commit f7159c4
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions qb/config.libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ check_enabled CXX DISCORD discord 'The C++ compiler is' false
check_enabled CXX QT 'Qt companion' 'The C++ compiler is' false

if [ "$HAVE_QT" != 'no' ]; then
_have_qt=$HAVE_QT
if [ "$HAVE_CXX17" = 'yes' ]; then
check_pkgconf QT6CORE Qt6Core 6.2
check_pkgconf QT6GUI Qt6Gui 6.2
Expand All @@ -296,22 +297,25 @@ if [ "$HAVE_QT" != 'no' ]; then

# pkg-config is needed to reliably find Qt6 libraries.

check_enabled QT6CORE QT Qt 'Qt6Core is' true
check_enabled QT6GUI QT Qt 'Qt6GUI is' true
check_enabled QT6WIDGETS QT Qt 'Qt6Widgets is' true
check_enabled QT6CONCURRENT QT Qt 'Qt6Concurrent is' true
check_enabled QT6NETWORK QT Qt 'Qt6Network is' true
#check_enabled QT6WEBENGINE QT Qt 'Qt6Webengine is' true

if [ "$HAVE_QT" != yes ]; then
die : 'Notice: Qt support disabled, required libraries were not found.'
else
check_enabled QT6CORE QT Qt 'Qt6Core is' user
check_enabled QT6GUI QT Qt 'Qt6GUI is' user
check_enabled QT6WIDGETS QT Qt 'Qt6Widgets is' user
check_enabled QT6CONCURRENT QT Qt 'Qt6Concurrent is' user
check_enabled QT6NETWORK QT Qt 'Qt6Network is' user
#check_enabled QT6WEBENGINE QT Qt 'Qt6Webengine is' user

if [ "$HAVE_QT6CORE" == 'yes' ] && \
[ "$HAVE_QT6GUI" == 'yes' ] && \
[ "$HAVE_QT6WIDGETS" == 'yes' ] && \
[ "$HAVE_QT6CONCURRENT" == 'yes' ] && \
[ "$HAVE_QT6NETWORK" == 'yes' ]
then
HAVE_QT6='yes'
add_define MAKEFILE HAVE_QT6 1
fi
fi
if [ "$HAVE_QT6" != 'yes' ]; then
HAVE_QT='auto'
HAVE_QT=$_have_qt
check_pkgconf QT5CORE Qt5Core 5.2
check_pkgconf QT5GUI Qt5Gui 5.2
check_pkgconf QT5WIDGETS Qt5Widgets 5.2
Expand All @@ -327,10 +331,10 @@ if [ "$HAVE_QT" != 'no' ]; then
check_enabled QT5CONCURRENT QT Qt 'Qt5Concurrent is' true
check_enabled QT5NETWORK QT Qt 'Qt5Network is' true
#check_enabled QT5WEBENGINE QT Qt 'Qt5Webengine is' true
fi

if [ "$HAVE_QT" != yes ]; then
die : 'Notice: Qt support disabled, required libraries were not found.'
fi
if [ "$HAVE_QT" != yes ]; then
die : 'Notice: Qt support disabled, required libraries were not found.'
fi

check_pkgconf OPENSSL openssl 1.0.0
Expand Down

0 comments on commit f7159c4

Please sign in to comment.