Skip to content

Commit

Permalink
Export icons according to XDG icon spec on unix
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew J. Milner <[email protected]>
  • Loading branch information
matterhorn103 committed Nov 4, 2024
1 parent 5c4f77c commit 3f45a0b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion avogadro/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,17 @@ 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")
elseif(WIN32)
list(APPEND avogadro_srcs icons/avogadro.rc)
Expand Down
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 3f45a0b

Please sign in to comment.