Qt: Bundle OS X target app
Jeffrey Pfau jeffrey@endrift.com
Sat, 06 Dec 2014 19:11:10 -0800
1 files changed,
8 insertions(+),
0 deletions(-)
jump to
M
src/platform/qt/CMakeLists.txt
→
src/platform/qt/CMakeLists.txt
@@ -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()