CMake: Add service, desktop, and icon files for Linux-like systems

These files are lifted from the ladybird-gtk4 repository and adapted
to work with the Qt UI port. They are installed by default on Linux, but
can be installed via a CMake option on other platforms.

Co-Authored-By: Sergey Bugaev <bugaevc@serenityos.org>
Co-Authored-By: Nicolas Ramz <nicolas.ramz@adevinta.com>
Co-Authored-By: Beckett Normington <beckett@b0ba.dev>
Co-Authored-By: Xexxa <93391300+Xexxa@users.noreply.github.com>
This commit is contained in:
Andrew Kaster 2025-07-07 09:55:46 -06:00 committed by Andrew Kaster
parent 69d4811ef7
commit 204e787131
Notes: github-actions[bot] 2025-07-08 20:36:21 +00:00
5 changed files with 65 additions and 0 deletions

View file

@ -109,3 +109,22 @@ if (NOT APPLE)
# On macOS the resources are handled via the MACOSX_PACKAGE_LOCATION property on each resource file
install_ladybird_resources("${CMAKE_INSTALL_DATADIR}/Lagom" ladybird_Runtime)
endif()
if (ENABLE_INSTALL_FREEDESKTOP_FILES)
set(FREEDESKTOP_RESOURCE_DIR "${LADYBIRD_SOURCE_DIR}/Meta/CMake/freedesktop")
install(FILES
"${FREEDESKTOP_RESOURCE_DIR}/org.ladybird.Ladybird.svg"
DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps"
COMPONENT ladybird_Runtime
)
install(FILES
"${FREEDESKTOP_RESOURCE_DIR}/org.ladybird.Ladybird.desktop"
DESTINATION "${CMAKE_INSTALL_DATADIR}/applications"
COMPONENT ladybird_Runtime
)
install(FILES
"${FREEDESKTOP_RESOURCE_DIR}/org.ladybird.Ladybird.service"
DESTINATION "${CMAKE_INSTALL_DATADIR}/dbus-1/services"
COMPONENT ladybird_Runtime
)
endif()