mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix(flatpak): use SVG for icon
Flatpak doesn't allow compressed SVGs as icons because this is against the specification.
This commit is contained in:
parent
d2508e7eac
commit
489027ea1e
|
@ -12,6 +12,7 @@ option(USE_FILTERAUDIO "Enable the echo canceling backend" ON)
|
|||
option(UPDATE_CHECK "Enable automatic update check" ON)
|
||||
option(USE_CCACHE "Use ccache when available" ON)
|
||||
option(SPELL_CHECK "Enable spell cheching support" ON)
|
||||
option(SVGZ_ICON "Compress the SVG icon of qTox" ON)
|
||||
option(ASAN "Compile with AddressSanitizer" OFF)
|
||||
|
||||
# process generated files if cmake >= 3.10
|
||||
|
|
|
@ -46,10 +46,17 @@ else()
|
|||
install(FILES ${path_from} DESTINATION ${path_to})
|
||||
endforeach(size)
|
||||
|
||||
# process the icon, compress if enabled
|
||||
set(SVG_SRC "${CMAKE_SOURCE_DIR}/img/icons/qtox.svg")
|
||||
if(${SVGZ_ICON})
|
||||
set(SVG_GZIP "${CMAKE_BINARY_DIR}/qtox.svgz")
|
||||
install(CODE "
|
||||
execute_process(COMMAND gzip -S z INPUT_FILE ${SVG_SRC} OUTPUT_FILE ${SVG_GZIP})
|
||||
" COMPONENT Runtime)
|
||||
install(FILES "${SVG_GZIP}" DESTINATION "share/icons/hicolor/scalable/apps")
|
||||
set(SVG_DEST "${SVG_GZIP}")
|
||||
else()
|
||||
set(SVG_DEST "${SVG_SRC}")
|
||||
endif()
|
||||
install(FILES "${SVG_DEST}" DESTINATION "share/icons/hicolor/scalable/apps")
|
||||
|
||||
endif()
|
||||
|
|
|
@ -145,6 +145,7 @@
|
|||
{
|
||||
"name": "qTox",
|
||||
"buildsystem": "cmake-ninja",
|
||||
"config-opts": ["-DSVGZ_ICON=OFF"],
|
||||
"sources": [
|
||||
{
|
||||
"type": "dir",
|
||||
|
|
Loading…
Reference in New Issue
Block a user