Skip to content

Commit

Permalink
Fix Qt6 DMG on Apple (#7240)
Browse files Browse the repository at this point in the history
- Fix linking issues with Qt Framework files
- Fix qmake detection
  • Loading branch information
tresf committed May 17, 2024
1 parent 2b679eb commit b49c122
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 1 addition & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions cmake/apple/install_apple.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit b49c122

Please sign in to comment.