[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35441] trunk/blender/source/creator/ CMakeLists.txt: untarring of Python 3. 2 tarballs would fail if CMake was installed into path with spaces.

Nathan Letwory nathan at letworyinteractive.com
Thu Mar 10 01:12:06 CET 2011


Revision: 35441
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35441
Author:   jesterking
Date:     2011-03-10 00:12:06 +0000 (Thu, 10 Mar 2011)
Log Message:
-----------
untarring of Python 3.2 tarballs would fail if CMake was installed into path with spaces. Slightly
change how the extraction commands are presented (old BUILD_TYPE was empty all the time here) and
ensure also that python/lib subdir under versioned dir gets actually created.

Modified Paths:
--------------
    trunk/blender/source/creator/CMakeLists.txt

Modified: trunk/blender/source/creator/CMakeLists.txt
===================================================================
--- trunk/blender/source/creator/CMakeLists.txt	2011-03-09 23:27:26 UTC (rev 35440)
+++ trunk/blender/source/creator/CMakeLists.txt	2011-03-10 00:12:06 UTC (rev 35441)
@@ -413,28 +413,47 @@
 
 			if(WITH_PYTHON_INSTALL)
 				#~ # note, as far as python is concerned 'RelWithDebInfo' is not debug since its without debug flags.
-				# install(CODE "message(\"copying a subset of the systems python...\")")
 
+				# create the directory in multiple steps, so it actually gets created when it doesn't exist yet
+				install(CODE "
+				message(\"creating ${TARGETDIR_VER}/python/lib\")
+				file(MAKE_DIRECTORY ${TARGETDIR_VER}/python/)
+				file(MAKE_DIRECTORY ${TARGETDIR_VER}/python/lib/)
+				message(\"done creating dir\")
+				")
+
 				install(
 					CODE
-					"execute_process(COMMAND ${CMAKE_COMMAND}
-					-E make_directory ${TARGETDIR_VER}/python/lib/)"
+					"
+					execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib/\"
+						COMMAND \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32.tar.gz\")
+					"
+					CONFIGURATIONS Release
 				)
-
 				install(
 					CODE
 					"
-					if(BUILD_TYPE MATCHES \"Debug\")
-						set(PYBUNDLE \"python32_d.tar.gz\")
-					else()
-						set(PYBUNDLE \"python32.tar.gz\")
-					endif()
-
-					execute_process(COMMAND ${CMAKE_COMMAND}
-						-E chdir ${TARGETDIR_VER}/python/lib/
-						${CMAKE_COMMAND} -E tar xzfv ${LIBDIR}/release/\${PYBUNDLE})
+					execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib/\"
+						COMMAND \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32.tar.gz\")
 					"
+					CONFIGURATIONS RelWithDebInfo
 				)
+				install(
+					CODE
+					"
+					execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib/\"
+						COMMAND \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32.tar.gz\")
+					"
+					CONFIGURATIONS MinSizeRel
+				)
+				install(
+					CODE
+					"
+					execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib/\"
+						COMMAND \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32_d.tar.gz\")
+					"
+					CONFIGURATIONS Debug
+				)
 
 				# doesnt work, todo
 				# install(CODE "execute_process(COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")




More information about the Bf-blender-cvs mailing list