CMakeLists.txt 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. SET(MACOSX_BUNDLE_ICON_FILE "icon.icns")
  2. SET(MACOSX_BUNDLE_GUI_IDENTIFIER "${PROJECT_NAME_UCASE}")
  3. SET(MACOSX_BUNDLE_LONG_VERSION_STRING "${VERSION}")
  4. SET(MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_NAME_UCASE}")
  5. SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VERSION}")
  6. SET(MACOSX_BUNDLE_BUNDLE_VERSION "${VERSION}")
  7. SET(MACOSX_BUNDLE_COPYRIGHT "${PROJECT_COPYRIGHT}")
  8. SET(MACOSX_BUNDLE_MIMETYPE "application/x-lmms-project")
  9. SET(MACOSX_BUNDLE_MIMETYPE_ICON "project.icns")
  10. SET(MACOSX_BUNDLE_MIMETYPE_ID "io.lmms")
  11. SET(MACOSX_BUNDLE_PROJECT_URL "${PROJECT_URL}")
  12. CONFIGURE_FILE("lmms.plist.in" "${CMAKE_BINARY_DIR}/Info.plist")
  13. CONFIGURE_FILE("install_apple.sh.in" "${CMAKE_BINARY_DIR}/install_apple.sh" @ONLY)
  14. CONFIGURE_FILE("package_apple.json.in" "${CMAKE_BINARY_DIR}/package_apple.json" @ONLY)
  15. # DMG creation target
  16. SET(DMG_FILE "${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}-mac${APPLE_OS_VER}.dmg")
  17. FILE(REMOVE "${DMG_FILE}")
  18. ADD_CUSTOM_TARGET(removedmg
  19. COMMAND touch "\"${DMG_FILE}\"" && rm "\"${DMG_FILE}\""
  20. COMMENT "Removing old DMG")
  21. ADD_CUSTOM_TARGET(dmg
  22. COMMAND appdmg "\"${CMAKE_BINARY_DIR}/package_apple.json\"" "\"${DMG_FILE}\""
  23. DEPENDS "${CMAKE_BINARY_DIR}/package_apple.json"
  24. COMMENT "Generating DMG")
  25. ADD_DEPENDENCIES(dmg removedmg)
  26. # see also ../postinstall/CMakeLists.txt