diff options
author | Pierre Ossman <ossman@cendio.se> | 2022-05-11 10:17:50 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2022-05-11 13:06:25 +0200 |
commit | e28bf7ae8e7e3f9796ae0dd0bc5d5644eb022044 (patch) | |
tree | b330ec22a11dfd4bebfc6f6eefbeeec04686fa55 /media/CMakeLists.txt | |
parent | 379ad8218842622b9a277eaa98dc36a6f49e1830 (diff) | |
download | tigervnc-e28bf7ae8e7e3f9796ae0dd0bc5d5644eb022044.tar.gz tigervnc-e28bf7ae8e7e3f9796ae0dd0bc5d5644eb022044.zip |
Add more Unix icon sizes
Some desktop environment, like KDE, need more rastered sizes and cannot
make use of the SVG.
Diffstat (limited to 'media/CMakeLists.txt')
-rw-r--r-- | media/CMakeLists.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/media/CMakeLists.txt b/media/CMakeLists.txt index 487e9d00..4bed4b6b 100644 --- a/media/CMakeLists.txt +++ b/media/CMakeLists.txt @@ -1,4 +1,4 @@ -set(ICON_SIZES 16 22 24 32 48) +set(ICON_SIZES 16 22 24 32 48 64 128) find_program(CONVERT_EXECUTABLE convert) @@ -9,11 +9,16 @@ if(CONVERT_EXECUTABLE) add_custom_target(icons DEPENDS ${ICON_FILES}) foreach(SIZE ${ICON_SIZES}) + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_${SIZE}.svg) + set(ICON_SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_${SIZE}.svg) + else() + set(ICON_SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_48.svg) + endif() add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/icons/tigervnc_${SIZE}.png COMMAND ${CONVERT_EXECUTABLE} -depth 8 -background transparent - ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_${SIZE}.svg + -size ${SIZE}x${SIZE} ${ICON_SRC_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/icons/tigervnc_${SIZE}.png - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_${SIZE}.svg + DEPENDS ${ICON_SRC_FILE} COMMENT "Generating icons/tigervnc_${SIZE}.png") endforeach() endif() |