Qt: Bundle OS X target app

This commit is contained in:
Jeffrey Pfau 2014-12-06 19:11:10 -08:00
parent 0b241710f4
commit 5a9cf99249
1 changed files with 8 additions and 0 deletions

View File

@ -84,3 +84,11 @@ if(Qt5Multimedia_FOUND)
list(APPEND QT_LIBRARIES Qt5::Multimedia)
endif()
target_link_libraries(mGBA ${PLATFORM_LIBRARY} ${OPENGL_LIBRARY} ${BINARY_NAME} ${QT_LIBRARIES})
install(TARGETS mGBA RUNTIME DESTINATION bin BUNDLE DESTINATION /Applications)
if(APPLE AND MACDEPLOYQT)
add_custom_command(TARGET mGBA POST_BUILD COMMAND ${MACDEPLOYQT} mGBA.app)
add_custom_command(TARGET mGBA POST_BUILD COMMAND rm -r mGBA.app/Contents/Plugins/bearer)
add_custom_command(TARGET mGBA POST_BUILD COMMAND rm -r mGBA.app/Contents/Plugins/imageformats)
add_custom_command(TARGET mGBA POST_BUILD COMMAND rm -r mGBA.app/Contents/Plugins/printsupport)
endif()