diff --git a/cmake/Deploy.cmake b/cmake/Deploy.cmake index 7a2739659f..eecd15d3ee 100644 --- a/cmake/Deploy.cmake +++ b/cmake/Deploy.cmake @@ -17,7 +17,12 @@ if(APPLE OR (WIN32 AND NOT STATIC)) add_custom_command(TARGET deploy POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${_qt_svg_dylib} $/../PlugIns/imageformats/ - COMMENT "Copying libqsvg.dylib" + COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtGui.framework/Versions/5/QtGui" "@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui" $/../PlugIns/imageformats/libqsvg.dylib + COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtWidgets.framework/Versions/5/QtWidgets" "@executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets" $/../PlugIns/imageformats/libqsvg.dylib + COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtSvg.framework/Versions/5/QtSvg" "@executable_path/../Frameworks/QtSvg.framework/Versions/5/QtSvg" $/../PlugIns/imageformats/libqsvg.dylib + COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtCore.framework/Versions/5/QtCore" "@executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore" $/../PlugIns/imageformats/libqsvg.dylib + COMMENT "Copying libqsvg.dylib, running install_name_tool" + ) endif()