diff options
author | xengineering <me@xengineering.eu> | 2024-11-28 20:26:24 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-11-28 20:26:24 +0100 |
commit | 7ec4c99cc17e47657d1b66063a54e68dc1f37a6b (patch) | |
tree | 74dbad5de67e0859d1b0fa682d7de96b95837d63 | |
parent | 3220c741812ab6df93aba2d1d53eab6f693e7401 (diff) | |
download | graphics-inkscape-7ec4c99cc17e47657d1b66063a54e68dc1f37a6b.tar graphics-inkscape-7ec4c99cc17e47657d1b66063a54e68dc1f37a6b.tar.zst graphics-inkscape-7ec4c99cc17e47657d1b66063a54e68dc1f37a6b.zip |
Refactor CMakeLists.txt
There was some code duplication which is now removed.
-rw-r--r-- | CMakeLists.txt | 12 |
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() |