Skip to content

Commit

Permalink
Merge pull request #520 from matterhorn103/icon-loc
Browse files Browse the repository at this point in the history
Export icons according to XDG icon spec on unix
  • Loading branch information
ghutchis authored Nov 6, 2024
2 parents b008518 + fdc7f3a commit 37724ee
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 2 deletions.
14 changes: 13 additions & 1 deletion avogadro/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,20 @@ if(APPLE)
elseif(UNIX)
install(FILES "icons/org.openchemistry.Avogadro2.desktop" DESTINATION "${INSTALL_XDG_APPS_DIR}")
install(FILES "icons/org.openchemistry.Avogadro2.metainfo.xml" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/metainfo")
install(FILES "icons/avogadro.png" DESTINATION "${INSTALL_XDG_ICON_DIR}"
install(FILES "icons/avogadro.png" DESTINATION "${INSTALL_XDG_ICON_DIR}/hicolor/32x32/apps"
RENAME "org.openchemistry.Avogadro2.png")
install(FILES "icons/avogadro.png" DESTINATION "${INSTALL_XDG_ICON_DIR}/hicolor/16x16@2/apps"
RENAME "org.openchemistry.Avogadro2.png")
install(FILES "icons/avogadro2_64.png" DESTINATION "${INSTALL_XDG_ICON_DIR}/hicolor/64x64/apps"
RENAME "org.openchemistry.Avogadro2.png")
install(FILES "icons/avogadro2_64.png" DESTINATION "${INSTALL_XDG_ICON_DIR}/hicolor/32x32@2/apps"
RENAME "org.openchemistry.Avogadro2.png")
install(FILES "icons/avogadro2_128.png" DESTINATION "${INSTALL_XDG_ICON_DIR}/hicolor/128x128/apps"
RENAME "org.openchemistry.Avogadro2.png")
install(FILES "icons/avogadro2_256.png" DESTINATION "${INSTALL_XDG_ICON_DIR}/hicolor/256x256/apps"
RENAME "org.openchemistry.Avogadro2.png")
install(FILES "icons/avogadro2.svg" DESTINATION "${INSTALL_XDG_ICON_DIR}/hicolor/scalable/apps"
RENAME "org.openchemistry.Avogadro2.svg")
elseif(WIN32)
list(APPEND avogadro_srcs icons/avogadro.rc)
endif()
Expand Down
106 changes: 106 additions & 0 deletions avogadro/icons/avogadro2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion cmake/InstallLocation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if(UNIX AND NOT APPLE)
set(INSTALL_XDG_APPS_DIR "${INSTALL_DATA_DIR}/applications")
endif()
if(NOT INSTALL_XDG_ICON_DIR)
set(INSTALL_XDG_ICON_DIR "${INSTALL_DATA_DIR}/pixmaps")
set(INSTALL_XDG_ICON_DIR "${INSTALL_DATA_DIR}/icons")
endif()
endif()

Expand Down

0 comments on commit 37724ee

Please sign in to comment.