def main():
    opt = ParseOption()
    if (not opt.qtdir):
        PrintErrorAndExit('--qtdir option is mandatory.')
    if (not opt.target):
        PrintErrorAndExit('--target option is mandatory.')
    unused_qtdir = os.path.abspath(opt.qtdir)
    target = os.path.abspath(opt.target)
    qtcore_framework = GetFrameworkPath('QtCore', '5')
    InstallNameTool(target, ('@rpath/%s' % qtcore_framework), GetReferenceTo(qtcore_framework))
    qtgui_framework = GetFrameworkPath('QtGui', '5')
    InstallNameTool(target, ('@rpath/%s' % qtgui_framework), GetReferenceTo(qtgui_framework))
    qtwidgets_framework = GetFrameworkPath('QtWidgets', '5')
    InstallNameTool(target, ('@rpath/%s' % qtwidgets_framework), GetReferenceTo(qtwidgets_framework))
    toollib_framework = GetFrameworkPath('GuiTool_lib', 'A')
    InstallNameTool(target, ('@executable_path/../Frameworks/%s' % toollib_framework), GetReferenceTo(toollib_framework))
def main():
    opt = ParseOption()
    if (not opt.qtdir):
        PrintErrorAndExit('--qtdir option is mandatory.')
    if (not opt.target):
        PrintErrorAndExit('--target option is mandatory.')
    unused_qtdir = os.path.abspath(opt.qtdir)
    target = os.path.abspath(opt.target)
    qtcore_framework = GetFrameworkPath('QtCore', '5')
    InstallNameTool(target, ('@rpath/%s' % qtcore_framework), GetReferenceTo(qtcore_framework))
    qtgui_framework = GetFrameworkPath('QtGui', '5')
    InstallNameTool(target, ('@rpath/%s' % qtgui_framework), GetReferenceTo(qtgui_framework))
    qtwidgets_framework = GetFrameworkPath('QtWidgets', '5')
    InstallNameTool(target, ('@rpath/%s' % qtwidgets_framework), GetReferenceTo(qtwidgets_framework))
    toollib_framework = GetFrameworkPath('GuiTool_lib', 'A')
    InstallNameTool(target, ('@executable_path/../Frameworks/%s' % toollib_framework), GetReferenceTo(toollib_framework))