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 83661d0 commit 4f88f8a
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions installer/osx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if( NOT EXISTS ${macdeployqt_path} )
endif()

# Run macdeployqt on the bundle at install time.
set ( macdeployqt_command
install( CODE
"execute_process(
COMMAND ${macdeployqt_path} \"\${CMAKE_INSTALL_PREFIX}/Power Tab Editor.app\" -verbose=2
RESULT_VARIABLE retval
Expand All @@ -33,9 +33,18 @@ set ( macdeployqt_command
endif ()
"
)
install( CODE ${macdeployqt_command} )
# Hack: run macdeployqt again to fix missing dependencies.
install( CODE ${macdeployqt_command} )

# 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}
Expand Down

0 comments on commit 4f88f8a

Please sign in to comment.