Skip to content
Snippets Groups Projects
Commit fda31d92 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[cmake] Remove deprecated inkscape_generate_png_from_svg

parent f8bc7ec2
No related branches found
No related tags found
1 merge request!1344Remove some code deprecated in 2.9
......@@ -109,6 +109,9 @@ In order to build the DUNE core modules you need at least the following software
- Remove deprecated CMake file `DuneCMakeCompat.cmake` that only contained a
deprecation message.
- Remove deprecated CMake function `inkscape_generate_png_from_svg`. Use
`dune_create_inkscape_image_converter_target` instead.
- We have changed the way optional dependencies are activated in the build-system internally.
The cmake macros `add_dune_xy_flags` do not set the compiler flag `-DENABLE_XY=1` anymore, but instead
set directly the flag `-DHAVE_XY=1`. Neither `ENABLE_XY` nor `HAVE_XY` should be modified manually
......@@ -367,7 +370,7 @@ In order to build the DUNE core modules you need at least the following software
setting `BUILD_SHARED_LIBS` accordingly. Building both static
and shared libraries is no longer supported.
- Remove the CMake function deprecated `inkscape_generate_png_from_svg`.
- Deprecate the CMake function `inkscape_generate_png_from_svg`.
- Remove the old and deprecated use of UseLATEX.cmake.
`dune_add_latex_document' is a redirection to `add_latex_document`
......
......@@ -3,28 +3,6 @@
# Module that provides conversion routines using inkscape
#
# .. cmake_function:: inkscape_generate_png_from_svg
#
# .. cmake_param:: OUTPUT_DIR
# :single:
#
# The output directory for the generated png files.
# Defaults to the current build directory.
#
# .. cmake_param:: pngfiles
# :single:
# :positional:
# :required:
#
# The files that should be converted.
#
# .. cmake_param:: DPI
# :single:
#
# dpi value for the generated image (default: 90)
#
#
#
# .. cmake_function:: dune_create_inkscape_image_converter_target
#
# Creates a target that when built, converts svg images to png images using inkscape
......@@ -59,46 +37,6 @@
#
include_guard(GLOBAL)
function(inkscape_generate_png_from_svg)
message(DEPRECATION "inkscape_generate_png_from_svg is deprecated (will be removed after release 2.9). "
"Use dune_create_inkscape_image_converter_target.")
if(NOT INKSCAPE)
return()
endif()
cmake_parse_arguments(INKSCAPE "" "OUTPUT_DIR;DPI" "" ${ARGN})
if(NOT INKSCAPE_OUTPUT_DIR)
set(INKSCAPE_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
endif()
if(NOT INKSCAPE_DPI)
set(INKSCAPE_DPI 90)
endif()
message(STATUS "Generate PNG from SVG in ${INKSCAPE_OUTPUT_DIR}")
set(_converted 0)
foreach(pic ${INKSCAPE_UNPARSED_ARGUMENTS})
string(REGEX REPLACE "\\.[a-zA-Z]+" ".svg" input ${pic})
if(NOT EXISTS ${INKSCAPE_OUTPUT_DIR}/${pic})
set(_converted 1)
if(INKSCAPE_NEW_VERSION)
execute_process(
COMMAND ${INKSCAPE} --export-dpi=${INKSCAPE_DPI} --export-type=png --export-filename=${pic} ${CMAKE_CURRENT_SOURCE_DIR}/${input}
WORKING_DIRECTORY ${INKSCAPE_OUTPUT_DIR}
OUTPUT_QUIET)
else()
execute_process(
COMMAND ${INKSCAPE} -z --export-dpi=${INKSCAPE_DPI} -e ${pic} ${CMAKE_CURRENT_SOURCE_DIR}/${input}
WORKING_DIRECTORY ${INKSCAPE_OUTPUT_DIR}
OUTPUT_QUIET)
endif()
endif()
endforeach()
if(_converted)
message(STATUS "Generate PNG from SVG in ${INKSCAPE_OUTPUT_DIR} - done")
else()
message(STATUS "Generate PNG from SVG in ${INKSCAPE_OUTPUT_DIR} - skipped")
endif()
endfunction()
function(dune_create_inkscape_image_converter_target)
set(OPTION ALL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment