Fix for CMake/OS X, would fail to copy files to bundle sometimes,
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 29 Sep 2009 09:48:30 +0000 (09:48 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 29 Sep 2009 09:48:30 +0000 (09:48 +0000)
doing make twice would avoid this, but that's not very convenient.

source/creator/CMakeLists.txt

index 95dbe9ecb37006175dc72ffdaa330db4dc649517..7a7101bb13cf485216c8551e7d15e7262a954893 100644 (file)
@@ -205,9 +205,9 @@ IF(WITH_INSTALL)
 
                ADD_CUSTOM_COMMAND(
                        TARGET blender POST_BUILD MAIN_DEPENDENCY blender
-                       COMMAND cp -R ${SOURCEINFO} ${TARGETDIR}/blender.app/Contents/
-                       COMMAND cp -R ${SOURCEDIR}/Contents/PkgInfo ${TARGETDIR}/blender.app/Contents/
-                       COMMAND cp -R ${SOURCEDIR}/Contents/Resources ${TARGETDIR}/blender.app/Contents/
+                       COMMAND cp -Rf ${SOURCEINFO} ${TARGETDIR}/blender.app/Contents/
+                       COMMAND cp -Rf ${SOURCEDIR}/Contents/PkgInfo ${TARGETDIR}/blender.app/Contents/
+                       COMMAND cp -Rf ${SOURCEDIR}/Contents/Resources ${TARGETDIR}/blender.app/Contents/
                        COMMAND cat ${SOURCEINFO} | sed s/VERSION/`cat ${CMAKE_SOURCE_DIR}/release/VERSION`/ | sed s/DATE/`date +'%Y-%b-%d'`/ > ${TARGETINFO}
                        COMMAND rm -Rf ${TARGETDIR}/blender.app/Contents/MacOS/.blender
                        COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
@@ -218,8 +218,8 @@ IF(WITH_INSTALL)
                        ADD_CUSTOM_COMMAND(
                                TARGET blender POST_BUILD MAIN_DEPENDENCY blender
                                COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
-                               COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/Resources/
-                               COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
+                               COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/Resources/
+                               COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
                                COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/Resources/
                        )
                ENDIF(WITH_INTERNATIONAL)