all repos — mgba @ 27eb75fcded51889a4f2b9d080b80737a50d1a1e

mGBA Game Boy Advance Emulator

Qt: Replace macdeployqt with tools/deploy-mac.py
Jeffrey Pfau jeffrey@endrift.com
Sat, 27 Dec 2014 18:17:47 -0800
commit

27eb75fcded51889a4f2b9d080b80737a50d1a1e

parent

66a1af39be2d17eb01020d5f82981e4191372e6d

1 files changed, 12 insertions(+), 5 deletions(-)

jump to
M src/platform/qt/CMakeLists.txtsrc/platform/qt/CMakeLists.txt

@@ -97,9 +97,16 @@ BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX}/Applications COMPONENT ${BINARY_NAME}-qt)

if(APPLE OR WIN32) set_target_properties(${BINARY_NAME}-qt PROPERTIES OUTPUT_NAME ${PROJECT_NAME}) endif() -if(APPLE AND MACDEPLOYQT) - add_custom_command(TARGET ${BINARY_NAME}-qt POST_BUILD COMMAND ${MACDEPLOYQT} ${PROJECT_NAME}.app) - add_custom_command(TARGET ${BINARY_NAME}-qt POST_BUILD COMMAND rm -r ${PROJECT_NAME}.app/Contents/Plugins/bearer) - add_custom_command(TARGET ${BINARY_NAME}-qt POST_BUILD COMMAND rm -r ${PROJECT_NAME}.app/Contents/Plugins/imageformats) - add_custom_command(TARGET ${BINARY_NAME}-qt POST_BUILD COMMAND rm -r ${PROJECT_NAME}.app/Contents/Plugins/printsupport) +if(APPLE) + set(DEPLOY_OPTIONS -p platforms/libqcocoa.dylib,accessible/libqtaccessiblewidgets.dylib,audio/libqtaudio_coreaudio.dylib) + if(NOT CMAKE_INSTALL_NAME_TOOL EQUAL "install_name_tool") + set(DEPLOY_OPTIONS ${DEPLOY_OPTIONS} -I ${CMAKE_INSTALL_NAME_TOOL}) + endif() + if(DEFINED CMAKE_OTOOL AND NOT CMAKE_OTOOL EQUAL "otool") + set(DEPLOY_OPTIONS ${DEPLOY_OPTIONS} -O ${CMAKE_OTOOL}) + endif() + if(DEFINED CROSS_ROOT) + set(DEPLOY_OPTIONS ${DEPLOY_OPTIONS} -R ${CROSS_ROOT}) + endif() + add_custom_command(TARGET ${BINARY_NAME}-qt POST_BUILD COMMAND ${CMAKE_SOURCE_DIR}/tools/deploy-mac.py ${DEPLOY_OPTIONS} ${PROJECT_NAME}.app) endif()