summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-11-28 21:04:43 +0100
committerxengineering <me@xengineering.eu>2024-11-28 21:04:43 +0100
commit03a876c1e9f2caeff34812e40f1174a89b9b96e1 (patch)
treec57f1c31a7503620db27dc8f58ecf656344a7e82 /CMakeLists.txt
parentce503eaa13cf5d81a5710a45af0357156e11cfa0 (diff)
downloadgraphics-inkscape-03a876c1e9f2caeff34812e40f1174a89b9b96e1.tar
graphics-inkscape-03a876c1e9f2caeff34812e40f1174a89b9b96e1.tar.zst
graphics-inkscape-03a876c1e9f2caeff34812e40f1174a89b9b96e1.zip
Handle convert to magick transition correctly
ImageMagick version 7 deprecated the `convert` command. Using it will trigger warnings on distributions with a recent version of it like e.g. Arch Linux. On other distributions (e.g. Debian) the new `magick` command is not available since ImageMagick version 6 is currently used. CMake can handle this by choosing `magick` if present and `convert` if not. This is done by this commit.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 341e7b4..1a72749 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,8 @@ set(formats
ico
)
+find_program(imagemagick magick convert)
+
foreach(icon ${icons})
foreach(format ${formats})
set(source "${CMAKE_CURRENT_SOURCE_DIR}/icons/${icon}.svg")
@@ -23,7 +25,7 @@ foreach(icon ${icons})
OUTPUT
${sink}
COMMAND
- convert
+ ${imagemagick}
${intermediate}
${sink}
DEPENDS