From 5add21b5a05639f6f1e57925f809f13223398aeb Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Wed, 17 Jan 2024 08:43:22 +0100 Subject: [PATCH] qt6 --- scripts/darwin/build.sh | 10 +++++----- scripts/darwin/install.sh | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/darwin/build.sh b/scripts/darwin/build.sh index d51aed16..53fe7c1c 100755 --- a/scripts/darwin/build.sh +++ b/scripts/darwin/build.sh @@ -12,13 +12,13 @@ mkdir -p "${BUILD_DIR}" cd "${BUILD_DIR}" if [[ $(uname -m) == 'arm64' ]]; then - Qt5_DIR="/opt/homebrew/opt/qt@5" - echo "Build with cmake $(uname -m) $Qt5_DIR" + Qt6_DIR="/opt/homebrew/opt/qt@6" + echo "Build with cmake $(uname -m) $Qt6_DIR" qmake ../BuildDltViewer.pro # cmake .. else - Qt5_DIR="/usr/local/opt/qt" - echo "Build with qmake $(uname -m) $Qt5_DIR" + Qt6_DIR="/usr/local/opt/qt" + echo "Build with qmake $(uname -m) $Qt6_DIR" qmake ../BuildDltViewer.pro make fi @@ -36,7 +36,7 @@ echo Build with CMake # https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html cmake -G Ninja \ -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \ - -DCMAKE_PREFIX_PATH=${Qt5_DIR}/lib/cmake \ + -DCMAKE_PREFIX_PATH=${Qt6_DIR}/lib/cmake \ -DCMAKE_OSX_DEPLOYMENT_TARGET=12.7 \ -DCMAKE_BUILD_TYPE=Release \ -DDLT_USE_QT_RPATH=ON \ diff --git a/scripts/darwin/install.sh b/scripts/darwin/install.sh index 1d197cc9..915871e6 100755 --- a/scripts/darwin/install.sh +++ b/scripts/darwin/install.sh @@ -5,12 +5,12 @@ env pwd brew update -brew install qt@5 +brew install qt@6 brew unlink qt@5 && brew link --force qt@5 -#brew link --overwrite qt@5 --force --overwrite +#brew link --overwrite qt@6 --force --overwrite # https://github.com/Homebrew/homebrew-core/issues/8392 # https://github.com/Homebrew/legacy-homebrew/issues/29938 -QT_VERSION=$(brew list --versions qt@5 | awk '{print $2}') +QT_VERSION=$(brew list --versions qt@6 | awk '{print $2}') echo "QT_VERSION=$QT_VERSION" if [[ -z "$QT_VERSION" ]]; then echo "QT_VERSION is empty" @@ -18,21 +18,21 @@ if [[ -z "$QT_VERSION" ]]; then fi # follow brew install suggestions -echo 'export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"' >> ~/.bash_profile -export LDFLAGS="-L/opt/homebrew/opt/qt@5/lib" -export CPPFLAGS="-I/opt/homebrew/opt/qt@5/include" -export PKG_CONFIG_PATH="/opt/homebrew/opt/qt@5/lib/pkgconfig" +echo 'export PATH="/opt/homebrew/opt/qt@6/bin:$PATH"' >> ~/.bash_profile +export LDFLAGS="-L/opt/homebrew/opt/qt@6/lib" +export CPPFLAGS="-I/opt/homebrew/opt/qt@6/include" +export PKG_CONFIG_PATH="/opt/homebrew/opt/qt@6/lib/pkgconfig" source ~/.bash_profile uname -a if [[ $(uname -m) == 'arm64' ]]; then echo "Run on MacOS arm64" - sudo ln -s -F "/opt/homebrew/Cellar/qt@5/${QT_VERSION}/mkspecs" /usr/local/mkspecs - sudo ln -s -F "/opt/homebrew/Cellar/qt@5/${QT_VERSION}/plugins" /usr/local/plugins + sudo ln -s -F "/opt/homebrew/Cellar/qt@6/${QT_VERSION}/mkspecs" /usr/local/mkspecs + sudo ln -s -F "/opt/homebrew/Cellar/qt@6/${QT_VERSION}/plugins" /usr/local/plugins else echo "Run on MacOS x86" - sudo ln -s "/usr/local/Cellar/qt@5/${QT_VERSION}/mkspecs" /usr/local/mkspecs - sudo ln -s "/usr/local/Cellar/qt@5/${QT_VERSION}/plugins" /usr/local/plugins + sudo ln -s "/usr/local/Cellar/qt@6/${QT_VERSION}/mkspecs" /usr/local/mkspecs + sudo ln -s "/usr/local/Cellar/qt@6/${QT_VERSION}/plugins" /usr/local/plugins fi brew install ninja tree