merged changes to revision 24077
[blender-staging.git] / source / creator / CMakeLists.txt
index 23d9544e2a90591d95633f5199b48448ce20f496..8c26eeee3c1ce27045b1023d93380e08f0d9c410 100644 (file)
@@ -174,6 +174,7 @@ IF(WITH_INSTALL)
                ADD_CUSTOM_COMMAND(
                        TARGET blender POST_BUILD MAIN_DEPENDENCY blender
                        COMMAND find ${TARGETDIR} -name .svn -prune -exec rm -rf {} "\;"
+                       COMMAND find ${TARGETDIR} -name __MACOSX -prune -exec rm -rf {} "\;"
                )
     
     
@@ -226,11 +227,16 @@ IF(WITH_INSTALL)
                ENDIF(WITH_INTERNATIONAL)
       
                IF(WITH_PYTHON)
+                       IF(WITH_LIBS10.5)
+                               SET(PYTHON_ZIP "python_${CMAKE_OSX_ARCHITECTURES}.zip")
+                       ELSE(WITH_LIBS10.5)
+                               SET(PYTHON_ZIP "python.zip")
+                       ENDIF(WITH_LIBS10.5)
                        ADD_CUSTOM_COMMAND(
                                TARGET blender POST_BUILD MAIN_DEPENDENCY blender
                                COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/scripts ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
                                COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/.blender/python/
-                               COMMAND unzip -q ${LIBDIR}/release/python.zip -d ${TARGETDIR}/blender.app/Contents/MacOS/.blender/python/
+                               COMMAND unzip -q ${LIBDIR}/release/${PYTHON_ZIP} -d ${TARGETDIR}/blender.app/Contents/MacOS/.blender/python/
                                COMMAND find ${TARGETDIR}/blender.app -name "*.py?" -prune -exec rm -rf {} "\;"
                        )
                ENDIF(WITH_PYTHON)