UseInkscape

Helpers for converting SVG images to PNG images with Inkscape.

dune_create_inkscape_image_converter_target

Create a custom target that converts SVG images to PNG files with Inkscape.

The command always creates the requested target. If Inkscape is not found, the target remains empty and no images are converted.

dune_create_inkscape_image_converter_target(
  TARGET <target-name>
  IMAGES <png-file>...
  [OUTPUT_DIR <directory>]
  [DPI <dpi>]
  [ALL]
)
TARGET

Name of the custom target to create.

IMAGES

Output PNG file names. For each entry, the corresponding SVG input file is derived by replacing the file extension with .svg.

OUTPUT_DIR

Output directory for generated PNG files. Defaults to the current binary directory.

DPI

DPI value used for the generated images. Defaults to 90.

ALL

Add the generated target to the default all target.