diff --git a/CMakeLists.txt b/CMakeLists.txt index e2bd6f8c..24971500 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() # diff --git a/src/leveleditor/CMakeLists.txt b/src/leveleditor/CMakeLists.txt index 1fdc4218..ea380637 100644 --- a/src/leveleditor/CMakeLists.txt +++ b/src/leveleditor/CMakeLists.txt @@ -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() diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index 1789293e..604f069d 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -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() diff --git a/src/smw/CMakeLists.txt b/src/smw/CMakeLists.txt index 103d3f35..8f7f6bab 100644 --- a/src/smw/CMakeLists.txt +++ b/src/smw/CMakeLists.txt @@ -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() diff --git a/src/worldeditor/CMakeLists.txt b/src/worldeditor/CMakeLists.txt index fb15e0bc..2493e3e6 100644 --- a/src/worldeditor/CMakeLists.txt +++ b/src/worldeditor/CMakeLists.txt @@ -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()