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(UPDATE_CHECK "Enable automatic update check" ON)
|
||||||
option(USE_CCACHE "Use ccache when available" ON)
|
option(USE_CCACHE "Use ccache when available" ON)
|
||||||
option(SPELL_CHECK "Enable spell cheching support" 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)
|
option(ASAN "Compile with AddressSanitizer" OFF)
|
||||||
|
|
||||||
# process generated files if cmake >= 3.10
|
# process generated files if cmake >= 3.10
|
||||||
|
|
|
@ -46,10 +46,17 @@ else()
|
||||||
install(FILES ${path_from} DESTINATION ${path_to})
|
install(FILES ${path_from} DESTINATION ${path_to})
|
||||||
endforeach(size)
|
endforeach(size)
|
||||||
|
|
||||||
|
# process the icon, compress if enabled
|
||||||
set(SVG_SRC "${CMAKE_SOURCE_DIR}/img/icons/qtox.svg")
|
set(SVG_SRC "${CMAKE_SOURCE_DIR}/img/icons/qtox.svg")
|
||||||
set(SVG_GZIP "${CMAKE_BINARY_DIR}/qtox.svgz")
|
if(${SVGZ_ICON})
|
||||||
install(CODE "
|
set(SVG_GZIP "${CMAKE_BINARY_DIR}/qtox.svgz")
|
||||||
execute_process(COMMAND gzip -S z INPUT_FILE ${SVG_SRC} OUTPUT_FILE ${SVG_GZIP})
|
install(CODE "
|
||||||
" COMPONENT Runtime)
|
execute_process(COMMAND gzip -S z INPUT_FILE ${SVG_SRC} OUTPUT_FILE ${SVG_GZIP})
|
||||||
install(FILES "${SVG_GZIP}" DESTINATION "share/icons/hicolor/scalable/apps")
|
" COMPONENT Runtime)
|
||||||
|
set(SVG_DEST "${SVG_GZIP}")
|
||||||
|
else()
|
||||||
|
set(SVG_DEST "${SVG_SRC}")
|
||||||
|
endif()
|
||||||
|
install(FILES "${SVG_DEST}" DESTINATION "share/icons/hicolor/scalable/apps")
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -145,6 +145,7 @@
|
||||||
{
|
{
|
||||||
"name": "qTox",
|
"name": "qTox",
|
||||||
"buildsystem": "cmake-ninja",
|
"buildsystem": "cmake-ninja",
|
||||||
|
"config-opts": ["-DSVGZ_ICON=OFF"],
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"type": "dir",
|
"type": "dir",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user