Skip to content

Commit

Permalink
Install the X11 icons to the hicolor theme
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatyas committed Aug 23, 2023
1 parent 4133cc0 commit 9fa81f1
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 22 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ else()
set(SMW_DATADIR "${CMAKE_INSTALL_FULL_DATADIR}/games/smw" CACHE PATH "Installation location of the game data")
set(SMW_DOCDIR "${CMAKE_INSTALL_FULL_DOCDIR}" CACHE PATH "Installation location of the game documentation")
set(SMW_DESKTOPDIR "${CMAKE_INSTALL_FULL_DATADIR}/applications" CACHE PATH "Installation location of the desktop launchers")
set(SMW_ICONDIR "${CMAKE_INSTALL_FULL_DATADIR}/pixmaps" CACHE PATH "Installation location of the desktop icons")
set(SMW_PIXMAPDIR "${CMAKE_INSTALL_FULL_DATADIR}/pixmaps" CACHE PATH "Installation location of the desktop pixmaps")
set(SMW_ICONDIR "${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor" CACHE PATH "Installation location of the desktop icons")
endif()

#
Expand Down
10 changes: 3 additions & 7 deletions src/leveleditor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND NOT SMW_INSTALL_PORTABLE)
configure_file("${PROJECT_SOURCE_DIR}/resources/linux/supermariowar-leveleditor.desktop.in"
"${PROJECT_BINARY_DIR}/supermariowar-leveleditor.desktop" @ONLY)

install(FILES "${PROJECT_BINARY_DIR}/supermariowar-leveleditor.desktop"
DESTINATION "${SMW_DESKTOPDIR}")

install(FILES
"${PROJECT_SOURCE_DIR}/resources/icons/smw-leveledit.png"
"${PROJECT_SOURCE_DIR}/resources/icons/smw-leveledit.xpm"
DESTINATION "${SMW_ICONDIR}")
install(FILES "${PROJECT_BINARY_DIR}/supermariowar-leveleditor.desktop" DESTINATION "${SMW_DESKTOPDIR}")
install(FILES "${PROJECT_SOURCE_DIR}/resources/icons/smw-leveledit.xpm" DESTINATION "${SMW_PIXMAPDIR}")
install(FILES "${PROJECT_SOURCE_DIR}/resources/icons/smw-leveledit.png" DESTINATION "${SMW_ICONDIR}/32x32/apps/")
endif()
6 changes: 6 additions & 0 deletions src/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ target_compile_definitions(smw-server PRIVATE IS_SERVER=1)
target_compile_options(smw-server PRIVATE "-Wall")

install(TARGETS smw-server DESTINATION "${SMW_BINDIR}")

# install Linux desktop item and icons
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND NOT SMW_INSTALL_PORTABLE)
install(FILES "${PROJECT_SOURCE_DIR}/resources/icons/smw-server.xpm" DESTINATION "${SMW_PIXMAPDIR}")
install(FILES "${PROJECT_SOURCE_DIR}/resources/icons/smw-server.png" DESTINATION "${SMW_ICONDIR}/32x32/apps/")
endif()
10 changes: 3 additions & 7 deletions src/smw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND NOT SMW_INSTALL_PORTABLE)
configure_file("${PROJECT_SOURCE_DIR}/resources/linux/supermariowar.desktop.in"
"${PROJECT_BINARY_DIR}/supermariowar.desktop" @ONLY)

install(FILES "${PROJECT_BINARY_DIR}/supermariowar.desktop"
DESTINATION "${SMW_DESKTOPDIR}")

install(FILES
"${PROJECT_SOURCE_DIR}/resources/icons/smw.png"
"${PROJECT_SOURCE_DIR}/resources/icons/smw.xpm"
DESTINATION "${SMW_ICONDIR}")
install(FILES "${PROJECT_BINARY_DIR}/supermariowar.desktop" DESTINATION "${SMW_DESKTOPDIR}")
install(FILES "${PROJECT_SOURCE_DIR}/resources/icons/smw.xpm" DESTINATION "${SMW_PIXMAPDIR}")
install(FILES "${PROJECT_SOURCE_DIR}/resources/icons/smw.png" DESTINATION "${SMW_ICONDIR}/32x32/apps/")
endif()
10 changes: 3 additions & 7 deletions src/worldeditor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND NOT SMW_INSTALL_PORTABLE)
configure_file("${PROJECT_SOURCE_DIR}/resources/linux/supermariowar-worldeditor.desktop.in"
"${PROJECT_BINARY_DIR}/supermariowar-worldeditor.desktop" @ONLY)

install(FILES "${PROJECT_BINARY_DIR}/supermariowar-worldeditor.desktop"
DESTINATION "${SMW_DESKTOPDIR}")

install(FILES
"${PROJECT_SOURCE_DIR}/resources/icons/smw-worldedit.png"
"${PROJECT_SOURCE_DIR}/resources/icons/smw-worldedit.xpm"
DESTINATION "${SMW_ICONDIR}")
install(FILES "${PROJECT_BINARY_DIR}/supermariowar-worldeditor.desktop" DESTINATION "${SMW_DESKTOPDIR}")
install(FILES "${PROJECT_SOURCE_DIR}/resources/icons/smw-worldedit.xpm" DESTINATION "${SMW_PIXMAPDIR}")
install(FILES "${PROJECT_SOURCE_DIR}/resources/icons/smw-worldedit.png" DESTINATION "${SMW_ICONDIR}/32x32/apps/")
endif()

0 comments on commit 9fa81f1

Please sign in to comment.