Ticket #51083: patch-build-app-bundle.2.diff

File patch-build-app-bundle.2.diff, 1.1 KB (added by ctreleaven (Craig Treleaven), 4 years ago)

Updated patch

  • CMakeLists.txt

    old new  
    9999# in result SAMPLE_RC_SRCS variable will contain paths to files produced by rcc
    100100QT_ADD_RESOURCES(RC_SRCS ${RESOURCE_FILES})
    101101
    102 add_executable(qgit ${CPP_SOURCES} ${UIS_HDRS} ${RC_SRCS})
     102if(APPLE)
     103    set(MACOSX_BUNDLE_ICON_FILE qgit.icns)
     104    set(ICON ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/qgit.icns)
     105    set_source_files_properties(${ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
     106    add_executable(qgit MACOSX_BUNDLE ${CPP_SOURCES} ${UIS_HDRS} ${RC_SRCS} ${ICON})
     107    set_target_properties(qgit PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE)
     108    set_target_properties(qgit PROPERTIES MACOSX_BUNDLE_ICON_FILE qgit.icns )
     109    set_target_properties(qgit PROPERTIES MACOSX_BUNDLE_LONG_VERSION_STRING @VERSION@ )
     110    set_target_properties(qgit PROPERTIES MACOSX_BUNDLE_SHORT_VERSION_STRING @VERSION@ )
     111    set_target_properties(qgit PROPERTIES MACOSX_BUNDLE_BUNDLE_VERSION @VERSION@ )
     112elseif()
     113    add_executable(qgit ${CPP_SOURCES} ${UIS_HDRS} ${RC_SRCS})
     114endif()
    103115target_link_libraries(qgit ${QT_LIBRARIES})