summaryrefslogtreecommitdiff
path: root/icons/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'icons/CMakeLists.txt')
-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()