summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-11-28 20:26:24 +0100
committerxengineering <me@xengineering.eu>2024-11-28 20:26:24 +0100
commit7ec4c99cc17e47657d1b66063a54e68dc1f37a6b (patch)
tree74dbad5de67e0859d1b0fa682d7de96b95837d63 /CMakeLists.txt
parent3220c741812ab6df93aba2d1d53eab6f693e7401 (diff)
downloadgraphics-inkscape-7ec4c99cc17e47657d1b66063a54e68dc1f37a6b.tar
graphics-inkscape-7ec4c99cc17e47657d1b66063a54e68dc1f37a6b.tar.zst
graphics-inkscape-7ec4c99cc17e47657d1b66063a54e68dc1f37a6b.zip
Refactor CMakeLists.txt
There was some code duplication which is now removed.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc08e39..fd4bb85 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,23 +14,25 @@ set(formats
foreach(icon ${icons})
foreach(format ${formats})
+ set(source "${CMAKE_CURRENT_SOURCE_DIR}/icons/${icon}.svg")
+ set(sink "${CMAKE_CURRENT_BINARY_DIR}/icons/${icon}.${format}")
add_custom_command(
OUTPUT
- ${CMAKE_CURRENT_BINARY_DIR}/icons/${icon}.${format}
+ ${sink}
COMMAND
SELF_CALL=xxx # https://gitlab.com/inkscape/inkscape/-/issues/4716
inkscape
--export-type=${format}
- --export-filename=${CMAKE_CURRENT_BINARY_DIR}/icons/${icon}.${format}
- ${CMAKE_CURRENT_SOURCE_DIR}/icons/${icon}.svg
+ --export-filename=${sink}
+ ${source}
DEPENDS
- ${CMAKE_CURRENT_SOURCE_DIR}/icons/${icon}.svg
+ ${source}
)
add_custom_target(
"icon-${icon}-${format}"
ALL
DEPENDS
- ${CMAKE_CURRENT_BINARY_DIR}/icons/${icon}.${format}
+ ${sink}
)
endforeach()
endforeach()