all repos — mgba @ 9299b75be58826ea21ea63212f38b0ea6b5fed94

mGBA Game Boy Advance Emulator

Qt: Rename project binaries for platforms excluding OS X and Windows
Jeffrey Pfau jeffrey@endrift.com
Sat, 06 Dec 2014 19:25:57 -0800
commit

9299b75be58826ea21ea63212f38b0ea6b5fed94

parent

9a61475229b9bb40c4dbaaf37de9588ca953728c

1 files changed, 11 insertions(+), 8 deletions(-)

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

@@ -76,19 +76,22 @@ qt5_add_resources(RESOURCES resources.qrc)

if(WIN32) list(APPEND RESOURCES ${CMAKE_SOURCE_DIR}/res/mgba.rc) endif() -add_executable(mGBA WIN32 MACOSX_BUNDLE main.cpp ${CMAKE_SOURCE_DIR}/res/mgba.icns ${SOURCE_FILES} ${UI_FILES} ${RESOURCES}) -set_target_properties(mGBA PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/res/info.plist.in) +add_executable(${BINARY_NAME}-qt WIN32 MACOSX_BUNDLE main.cpp ${CMAKE_SOURCE_DIR}/res/mgba.icns ${SOURCE_FILES} ${UI_FILES} ${RESOURCES}) +set_target_properties(${BINARY_NAME}-qt PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/res/info.plist.in) set(QT_LIBRARIES Qt5::Widgets Qt5::OpenGL) if(Qt5Multimedia_FOUND) list(APPEND QT_LIBRARIES Qt5::Multimedia) endif() -target_link_libraries(mGBA ${PLATFORM_LIBRARY} ${OPENGL_LIBRARY} ${BINARY_NAME} ${QT_LIBRARIES}) +target_link_libraries(${BINARY_NAME}-qt ${PLATFORM_LIBRARY} ${OPENGL_LIBRARY} ${BINARY_NAME} ${QT_LIBRARIES}) -install(TARGETS mGBA RUNTIME DESTINATION bin BUNDLE DESTINATION /Applications) +install(TARGETS ${BINARY_NAME}-qt RUNTIME DESTINATION bin BUNDLE DESTINATION /Applications) +if(APPLE OR WIN32) + set_target_properties(${BINARY_NAME}-qt PROPERTIES OUTPUT_NAME ${PROJECT_NAME}) +endif() 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) + 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) endif()