--- file-integration/CMakeLists.txt.orig 2018-12-22 15:06:49 UTC +++ file-integration/CMakeLists.txt @@ -11,15 +11,8 @@ install(TARGETS basketthumbcreator DESTINATION ${PLUGI ########### install files ############### -find_program(XDG-MIME_EXECUTABLE xdg-mime) -find_program(XDG-DESKTOP-MENU_EXECUTABLE xdg-desktop-menu) +find_package(SharedMimeInfo REQUIRED) install(FILES basketthumbcreator.desktop DESTINATION ${SERVICES_INSTALL_DIR}) -install(CODE " -execute_process(COMMAND ${XDG-MIME_EXECUTABLE} install --novendor - ${CMAKE_CURRENT_SOURCE_DIR}/basket.xml) -execute_process(COMMAND ${XDG-DESKTOP-MENU_EXECUTABLE} install - --novendor ${CMAKE_SOURCE_DIR}/src/basket.desktop) -execute_process(COMMAND ${XDG-MIME_EXECUTABLE} default - ${CMAKE_SOURCE_DIR}/src/basket.desktop application/x-basket-item) -") +install(FILES basket.xml DESTINATION ${XDG_MIME_INSTALL_DIR}) +update_xdg_mimetypes(${XDG_MIME_INSTALL_DIR})