diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index aa37a4e..341e7b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,24 +10,39 @@ set(formats pdf svg png + ico ) foreach(icon ${icons}) foreach(format ${formats}) set(source "${CMAKE_CURRENT_SOURCE_DIR}/icons/${icon}.svg") set(sink "${CMAKE_CURRENT_BINARY_DIR}/icons/${format}/${icon}.${format}") - add_custom_command( - OUTPUT - ${sink} - COMMAND - SELF_CALL=xxx # https://gitlab.com/inkscape/inkscape/-/issues/4716 - inkscape - --export-type=${format} - --export-filename=${sink} - ${source} - DEPENDS - ${source} - ) + if(format STREQUAL ico) + set(intermediate "${CMAKE_CURRENT_BINARY_DIR}/icons/png/${icon}.png") + add_custom_command( + OUTPUT + ${sink} + COMMAND + convert + ${intermediate} + ${sink} + DEPENDS + ${intermediate} + ) + else() + add_custom_command( + OUTPUT + ${sink} + COMMAND + SELF_CALL=xxx # https://gitlab.com/inkscape/inkscape/-/issues/4716 + inkscape + --export-type=${format} + --export-filename=${sink} + ${source} + DEPENDS + ${source} + ) + endif() add_custom_target( "icon-${icon}-${format}" ALL |