Skip to content

Commit

Permalink
Run install_name_tool to fix up the executable's rpath
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronwhite committed Oct 6, 2024
1 parent 50ed543 commit 0642f64
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion installer/osx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ endif()
# Run macdeployqt on the bundle at install time.
install( CODE
"execute_process(
COMMAND ${macdeployqt_path} \"\${CMAKE_INSTALL_PREFIX}/Power Tab Editor.app\"
COMMAND ${macdeployqt_path} \"\${CMAKE_INSTALL_PREFIX}/Power Tab Editor.app\" -verbose=2
RESULT_VARIABLE retval
)
if ( NOT retval EQUAL 0 )
Expand All @@ -34,6 +34,18 @@ install( CODE
"
)

# Fix up the executable's rpath, which macdeployqt6 doesn't seem to do anymore...
install( CODE
"execute_process(
COMMAND install_name_tool -add_rpath \"@executable_path/../Frameworks\" \"\${CMAKE_INSTALL_PREFIX}/Power Tab Editor.app/Contents/MacOS/Power Tab Editor\"
RESULT_VARIABLE retval
)
if ( NOT retval EQUAL 0 )
message( FATAL_ERROR \"Failed to run install_name_tool\" )
endif ()
"
)

# Install the Qt translations (macdeployqt doesn't handle this)
install( FILES ${PTE_QT_TRANSLATION_FILES}
DESTINATION "${CPACK_PACKAGE_NAME}.app/Contents/Resources/translations"
Expand Down

0 comments on commit 0642f64

Please sign in to comment.