summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-11-28 19:52:51 +0100
committerxengineering <me@xengineering.eu>2024-11-28 19:52:51 +0100
commit3220c741812ab6df93aba2d1d53eab6f693e7401 (patch)
tree5ace6c104f63cd8fccba2a2d663b90c753fcb6af /CMakeLists.txt
parent8a8d8af76578970651738ccd6d141333a82ca9d0 (diff)
downloadgraphics-inkscape-3220c741812ab6df93aba2d1d53eab6f693e7401.tar
graphics-inkscape-3220c741812ab6df93aba2d1d53eab6f693e7401.tar.zst
graphics-inkscape-3220c741812ab6df93aba2d1d53eab6f693e7401.zip
Drop JPEG support
This is done because of three reasons: - CMake code is simplified - `ImageMagick` dependency is not needed anymore - PNG in contrast to JPEG only uses lossless compression [1] - PNG in contrast to JPEG can store transparent pixels [1] - build time is reduced (not yet relevant but will be) [1]: https://www.adobe.com/creativecloud/file-types/image/comparison/jpeg-vs-png.html
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt38
1 files changed, 12 insertions, 26 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb6758f..bc08e39 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,36 +10,22 @@ set(formats
pdf
svg
png
- jpg
)
foreach(icon ${icons})
foreach(format ${formats})
- if(format STREQUAL jpg)
- add_custom_command(
- OUTPUT
- ${CMAKE_CURRENT_BINARY_DIR}/icons/${icon}.${format}
- COMMAND
- magick
- ${CMAKE_CURRENT_BINARY_DIR}/icons/${icon}.png
- ${CMAKE_CURRENT_BINARY_DIR}/icons/${icon}.${format}
- DEPENDS
- ${CMAKE_CURRENT_BINARY_DIR}/icons/${icon}.png
- )
- else()
- add_custom_command(
- OUTPUT
- ${CMAKE_CURRENT_BINARY_DIR}/icons/${icon}.${format}
- 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
- DEPENDS
- ${CMAKE_CURRENT_SOURCE_DIR}/icons/${icon}.svg
- )
- endif()
+ add_custom_command(
+ OUTPUT
+ ${CMAKE_CURRENT_BINARY_DIR}/icons/${icon}.${format}
+ 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
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/icons/${icon}.svg
+ )
add_custom_target(
"icon-${icon}-${format}"
ALL