Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-08-26 18:13:04 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-08-26 18:13:04 +0400
commit11cfc97e29344a71aea2ddc762ffb28be46a0846 (patch)
tree2a409d58db61a0b28f0206481bc9980ba0a71d26 /build_files
parent49ae48bc16023e5a10cd3cb7b6a1685d5c97e68e (diff)
Fix cmake Inkscape auto generate of SVG on OS X giving an error popup, the binary
that is found by find_program is a shim that doesn't take command line arguments.
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/macros.cmake11
1 files changed, 10 insertions, 1 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 71706d87d5c..ace1ed912be 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -819,6 +819,15 @@ macro(svg_to_png
mark_as_advanced(INKSCAPE_EXE)
if(INKSCAPE_EXE)
+ if(APPLE)
+ # in OS X app bundle, the binary is a shim that doesn't take any
+ # command line arguments, replace it with the actual binary
+ string(REPLACE "MacOS/Inkscape" "Resources/bin/inkscape" INKSCAPE_REAL_EXE ${INKSCAPE_EXE})
+ if(EXISTS "${INKSCAPE_REAL_EXE}")
+ set(INKSCAPE_EXE ${INKSCAPE_REAL_EXE})
+ endif()
+ endif()
+
add_custom_command(
OUTPUT ${_file_to}
COMMAND ${INKSCAPE_EXE} ${_file_from} --export-dpi=${dpi} --without-gui --export-png=${_file_to}
@@ -831,4 +840,4 @@ macro(svg_to_png
unset(_file_from)
unset(_file_to)
-endmacro() \ No newline at end of file
+endmacro()