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

File patch-build-app-bundle.3.diff, 1.2 KB (added by RJVB (René Bertin), 4 years ago)
  • CMakeLists.txt

    diff --git CMakeLists.txt CMakeLists.txt
    index ddccd04..024d6df 100644
    SET(RESOURCE_FILES 
    9898# in result SAMPLE_RC_SRCS variable will contain paths to files produced by rcc
    9999QT_ADD_RESOURCES(RC_SRCS ${RESOURCE_FILES})
    100100
    101 add_executable(qgit ${CPP_SOURCES} ${UIS_HDRS} ${RC_SRCS})
     101if(APPLE)
     102    set(MACOSX_BUNDLE_ICON_FILE qgit.icns)
     103    set(ICON ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/qgit.icns)
     104    set_source_files_properties(${ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
     105    add_executable(qgit MACOSX_BUNDLE ${CPP_SOURCES} ${UIS_HDRS} ${RC_SRCS} ${ICON})
     106    set_target_properties(qgit PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE)
     107    set_target_properties(qgit PROPERTIES MACOSX_BUNDLE_ICON_FILE qgit.icns )
     108    set_target_properties(qgit PROPERTIES MACOSX_BUNDLE_LONG_VERSION_STRING @VERSION@ )
     109    set_target_properties(qgit PROPERTIES MACOSX_BUNDLE_SHORT_VERSION_STRING @VERSION@ )
     110    set_target_properties(qgit PROPERTIES MACOSX_BUNDLE_BUNDLE_VERSION @VERSION@ )
     111    set_target_properties(qgit PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "QGit")
     112elseif()
     113    add_executable(qgit ${CPP_SOURCES} ${UIS_HDRS} ${RC_SRCS})
     114endif()
    102115target_link_libraries(qgit ${QT_LIBRARIES})
    103116
    104117