Revision: 59522
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59522
Author:   blendix
Date:     2013-08-26 14:13:04 +0000 (Mon, 26 Aug 2013)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/build_files/cmake/macros.cmake

Modified: trunk/blender/build_files/cmake/macros.cmake
===================================================================
--- trunk/blender/build_files/cmake/macros.cmake        2013-08-26 13:50:25 UTC 
(rev 59521)
+++ trunk/blender/build_files/cmake/macros.cmake        2013-08-26 14:13:04 UTC 
(rev 59522)
@@ -819,6 +819,15 @@
        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 @@
        unset(_file_from)
        unset(_file_to)
 
-endmacro()
\ No newline at end of file
+endmacro()

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to