[Bf-blender-cvs] [da5fb82] master: CMake: readme.html version trick broke packages

Campbell Barton noreply at git.blender.org
Mon Mar 23 21:49:53 CET 2015


Commit: da5fb82a63ea95f75e42092bee60027d3706c9ce
Author: Campbell Barton
Date:   Tue Mar 24 07:47:01 2015 +1100
Branches: master
https://developer.blender.org/rBda5fb82a63ea95f75e42092bee60027d3706c9ce

CMake: readme.html version trick broke packages

===================================================================

M	source/creator/CMakeLists.txt

===================================================================

diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 57e67a9..1557cc0 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -239,28 +239,13 @@ if(WITH_BUILDINFO)
 	add_dependencies(blender buildinfo)
 endif()
 
-# Post build steps for bundling/packaging.
-
-function(install_text_files_patch path)
-	install(
-		CODE
-		"
-		set(DATA_FILE \"${path}/readme.html\")
-		file(READ \"\${DATA_FILE}\" DATA_SRC)
-		string(REGEX REPLACE \"BLENDER_VERSION\" \"${BLENDER_VERSION}\" DATA_DST \"\${DATA_SRC}\")
-		file(WRITE \"\${DATA_FILE}\" \"\${DATA_DST}\")
-		unset(DATA_FILE)
-		unset(DATA_SRC)
-		unset(DATA_DST)
-		"
-	)
-endfunction()
 
 set(BLENDER_TEXT_FILES
 	${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt
 	${CMAKE_SOURCE_DIR}/release/text/Python-license.txt
 	${CMAKE_SOURCE_DIR}/release/text/copyright.txt
-	${CMAKE_SOURCE_DIR}/release/text/readme.html
+	# generate this file
+	# ${CMAKE_SOURCE_DIR}/release/text/readme.html
 	${CMAKE_SOURCE_DIR}/release/datafiles/LICENSE-bfont.ttf.txt
 )
 
@@ -972,12 +957,25 @@ endif()
 # Generic Install, for all targets
 
 if(DEFINED BLENDER_TEXT_FILES_DESTINATION)
+
+	install(
+		CODE
+		"
+		file(READ \"${CMAKE_SOURCE_DIR}/release/text/readme.html\" DATA_SRC)
+		string(REGEX REPLACE \"BLENDER_VERSION\" \"${BLENDER_VERSION}\" DATA_DST \"\${DATA_SRC}\")
+		file(WRITE \"\${CMAKE_BINARY_DIR}/release/text/readme.html\" \"\${DATA_DST}\")
+		unset(DATA_SRC)
+		unset(DATA_DST)
+		"
+	)
+	list(APPEND BLENDER_TEXT_FILES
+		${CMAKE_BINARY_DIR}/release/text/readme.html
+	)
+
 	install(
 		FILES ${BLENDER_TEXT_FILES}
 		DESTINATION "${BLENDER_TEXT_FILES_DESTINATION}"
 	)
-
-	install_text_files_patch("\${CMAKE_INSTALL_PREFIX}/${BLENDER_TEXT_FILES_DESTINATION}")
 endif()
 
 # install more files specified elsewhere




More information about the Bf-blender-cvs mailing list