diff --git a/CMakeLists.txt b/CMakeLists.txt index 1853b121105..4924eb96d02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,12 +217,7 @@ IF(LMMS_BUILD_LINUX AND WANT_VST) ENDIF() # Resolve qmake to full path for use in packaging scripts -IF(WANT_QT6) - FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAME qmake.exe - PATHS "${CMAKE_PREFIX_PATH}/bin" /opt/Qt6/bin) # TODO: add more paths here -ELSE() - GET_TARGET_PROPERTY(QT_QMAKE_EXECUTABLE "${Qt5Core_QMAKE_EXECUTABLE}" IMPORTED_LOCATION) -ENDIF() +GET_TARGET_PROPERTY(QT_QMAKE_EXECUTABLE Qt${QT_VERSION_MAJOR}::qmake IMPORTED_LOCATION) # Find the location of Qt translation files execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_TRANSLATIONS diff --git a/cmake/apple/install_apple.sh.in b/cmake/apple/install_apple.sh.in index fc27d78b30a..f9352c6f914 100644 --- a/cmake/apple/install_apple.sh.in +++ b/cmake/apple/install_apple.sh.in @@ -16,6 +16,9 @@ echo -e "$MSG_COLOR\n\nCreating App Bundle \"$APP\"...$COLOR_RESET" qtpath="$(dirname "@QT_QMAKE_EXECUTABLE@")" export PATH="$PATH:$qtpath" +# Qt6: Fix @rpath bug https://github.com/orgs/Homebrew/discussions/2823 +ln -sf "$qtpath/../lib" "@CMAKE_BINARY_DIR@/lib" + # Remove any old .app bundles rm -Rf "$APP"