diff options
author | xengineering <me@xengineering.eu> | 2024-11-24 21:03:47 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-11-24 21:03:47 +0100 |
commit | df902d98161dadc7131b2aa49dd5953a29faadb6 (patch) | |
tree | a8cf29e5072a25f087a7ea1b7f2bc65be8190e4d | |
parent | ae8cd22064f226e78769bae4086d2c610dc012af (diff) | |
download | graphics-inkscape-df902d98161dadc7131b2aa49dd5953a29faadb6.tar graphics-inkscape-df902d98161dadc7131b2aa49dd5953a29faadb6.tar.zst graphics-inkscape-df902d98161dadc7131b2aa49dd5953a29faadb6.zip |
icons: Add jpg output format
-rw-r--r-- | icons/CMakeLists.txt | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt index 929f981..16ee68c 100644 --- a/icons/CMakeLists.txt +++ b/icons/CMakeLists.txt @@ -6,24 +6,36 @@ set(formats pdf svg png + jpg ) foreach(icon ${icons}) foreach(format ${formats}) - add_custom_command( - OUTPUT - ${CMAKE_CURRENT_BINARY_DIR}/${icon}.${format} - COMMAND - SELF_CALL=xxx # https://gitlab.com/inkscape/inkscape/-/issues/4716 - inkscape - --export-type=${format} - --export-filename=${CMAKE_CURRENT_BINARY_DIR}/${icon}.${format} - ${CMAKE_CURRENT_SOURCE_DIR}/${icon}.svg - WORKING_DIRECTORY - ${CMAKE_CURRENT_SOURCE_DIR} - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/${icon}.svg - ) + if(format STREQUAL jpg) + add_custom_command( + OUTPUT + ${CMAKE_CURRENT_BINARY_DIR}/${icon}.${format} + COMMAND + magick + ${CMAKE_CURRENT_BINARY_DIR}/${icon}.png + ${CMAKE_CURRENT_BINARY_DIR}/${icon}.${format} + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/${icon}.png + ) + else() + add_custom_command( + OUTPUT + ${CMAKE_CURRENT_BINARY_DIR}/${icon}.${format} + COMMAND + SELF_CALL=xxx # https://gitlab.com/inkscape/inkscape/-/issues/4716 + inkscape + --export-type=${format} + --export-filename=${CMAKE_CURRENT_BINARY_DIR}/${icon}.${format} + ${CMAKE_CURRENT_SOURCE_DIR}/${icon}.svg + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/${icon}.svg + ) + endif() add_custom_target( "icon-${icon}-${format}" ALL |