From 14d98d0388043f7e49451e31fcc1cbb46a214fa9 Mon Sep 17 00:00:00 2001 From: Ankit Meel Date: Tue, 15 Feb 2022 10:14:35 +0530 Subject: CMake: create readme.html with configure_file Since the output file stays unmodified for most developer builds, install step installed it redundantly. Create readme.html using `configure_file`: - Now it's modified only if final output changes (handled by CMake). - If input file (from git) or blender version changes, it //will// be modified. Also don't re-implement what CMake can do. Reviewed By: campbellbarton, LazyDodo Differential Revision: https://developer.blender.org/D13863 --- source/creator/CMakeLists.txt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index e804db05687..e6e122508a9 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -1130,15 +1130,9 @@ endif() 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) - " + configure_file(${CMAKE_SOURCE_DIR}/release/text/readme.html + ${CMAKE_BINARY_DIR}/release/text/readme.html + @ONLY ) list(APPEND BLENDER_TEXT_FILES ${CMAKE_BINARY_DIR}/release/text/readme.html -- cgit v1.2.3