blob: 97ff3bc632317227017a3ed811b290aa2924f448 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
set(icons
example
)
set(formats
pdf
svg
)
foreach(icon ${icons})
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()
|