summaryrefslogtreecommitdiff
path: root/icons
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-11-24 18:27:55 +0100
committerxengineering <me@xengineering.eu>2024-11-24 18:28:47 +0100
commit285c5875fbe56b08d7d73e2c371f6f7f58dc8a0e (patch)
tree31178a60126e5be5a1deacf595126c0a7e867eaa /icons
parenteffab958449ea54b07ba71a9075720fdfdaf0267 (diff)
downloadgraphics-inkscape-285c5875fbe56b08d7d73e2c371f6f7f58dc8a0e.tar
graphics-inkscape-285c5875fbe56b08d7d73e2c371f6f7f58dc8a0e.tar.zst
graphics-inkscape-285c5875fbe56b08d7d73e2c371f6f7f58dc8a0e.zip
icons: Add SVG output format
Inkscape provides also SVG output. While the source file is also an SVG the output SVG file e.g. has a correct docname in the file matching the file name. This also adds a CMake target for the output SVG.
Diffstat (limited to 'icons')
-rw-r--r--icons/CMakeLists.txt35
1 files changed, 21 insertions, 14 deletions
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt
index a66c305..97ff3bc 100644
--- a/icons/CMakeLists.txt
+++ b/icons/CMakeLists.txt
@@ -2,19 +2,26 @@ set(icons
example
)
+set(formats
+ pdf
+ svg
+)
+
foreach(icon ${icons})
- add_custom_target("icon-${icon}-pdf" ALL)
- add_custom_command(
- TARGET
- "icon-${icon}-pdf"
- POST_BUILD
- COMMAND
- SELF_CALL=xxx # https://gitlab.com/inkscape/inkscape/-/issues/4716
- inkscape
- --export-type=pdf
- --export-filename=${CMAKE_CURRENT_BINARY_DIR}/${icon}.pdf
- ${CMAKE_CURRENT_SOURCE_DIR}/${icon}.svg
- WORKING_DIRECTORY
- ${CMAKE_CURRENT_SOURCE_DIR}
- )
+ foreach(format ${formats})
+ add_custom_target("icon-${icon}-${format}" ALL)
+ add_custom_command(
+ TARGET
+ "icon-${icon}-${format}"
+ POST_BUILD
+ 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}
+ )
+ endforeach()
endforeach()