From 5d38fd3fe8f24ebb6cff40c841e469b515d91c05 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 27 Aug 2024 22:32:01 -0700 Subject: [PATCH] Make googlemaps compile with Qt5 and Qt6 Signed-off-by: Dirk Hohndel --- scripts/build.sh | 6 +++++- scripts/get-dep-lib.sh | 21 ++++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 95b3e242f..6f7086451 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -571,7 +571,11 @@ if [ "$QUICK" != "1" ] && [ "$BUILD_DESKTOP$BUILD_MOBILE" != "" ] && ( [[ $QT_VE # build the googlemaps map plugin cd "$SRC" - ./${SRC_DIR}/scripts/get-dep-lib.sh single . googlemaps + if [ "$BUILD_WITH_QT6" = "1" ] ; then + ./${SRC_DIR}/scripts/get-dep-lib.sh -qt6 single . googlemaps + else + ./${SRC_DIR}/scripts/get-dep-lib.sh single . googlemaps + fi pushd googlemaps mkdir -p build mkdir -p J10build diff --git a/scripts/get-dep-lib.sh b/scripts/get-dep-lib.sh index 48a22b4bf..16c5f33fd 100755 --- a/scripts/get-dep-lib.sh +++ b/scripts/get-dep-lib.sh @@ -79,13 +79,17 @@ curl_download_library() { fi } - +QT6="0" # deal with all the command line arguments +if [ "$1" == "-qt6" ] ; then + shift + QT6="1" +fi if [ $# -ne 2 ] && [ $# -ne 3 ] ; then echo "wrong number of parameters, format:" - echo "get-dep-lib.sh " - echo "get-dep-lib.sh single " - echo "get-dep-lib.sh singleAndroid " + echo "get-dep-lib.sh [ -qt6 ] " + echo "get-dep-lib.sh [ -qt6 ] single " + echo "get-dep-lib.sh [ -qt6 ] singleAndroid " echo "where" echo " is one of scripts, ios or android" echo "(the name of the directory where build.sh resides)" @@ -169,9 +173,12 @@ for package in "${PACKAGES[@]}" ; do git_checkout_library breeze-icons $CURRENT_BREEZE_ICONS https://github.com/kde/breeze-icons.git ;; googlemaps) - #git_checkout_library googlemaps master https://github.com/Subsurface/googlemaps.git - git_checkout_library googlemaps master https://github.com/vladest/googlemaps.git - ;; + if [ "$QT6" = "1" ] ; then + git_checkout_library googlemaps master https://github.com/vladest/googlemaps.git + else + git_checkout_library googlemaps master https://github.com/Subsurface/googlemaps.git + fi + ;; hidapi) git_checkout_library hidapi master https://github.com/libusb/hidapi.git ;;