* BugFix: Correct an error that can cause portions of the template to not be copied.

This commit is contained in:
Robert MacGregor 2022-05-31 21:20:02 -04:00
parent 0b15bc25e0
commit 372a79c8f7

View file

@ -15,9 +15,8 @@ foreach(ITEM ${SCRIPT_FILES})
STRING(REGEX REPLACE "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/" "${TORQUE_APP_ROOT_DIRECTORY}/" INSTALL_DIR ${dir}) STRING(REGEX REPLACE "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/" "${TORQUE_APP_ROOT_DIRECTORY}/" INSTALL_DIR ${dir})
STRING(REGEX REPLACE ".tscript" ".${TORQUE_SCRIPT_EXTENSION}" newScriptName ${scriptName}) STRING(REGEX REPLACE ".tscript" ".${TORQUE_SCRIPT_EXTENSION}" newScriptName ${scriptName})
# We can't use the file(COPY command to copy to a new file name so we copy as-is first then rename # Copy the file and perform a rename at the same time
file(COPY ${ITEM} DESTINATION ${INSTALL_DIR}) file(COPY_FILE ${ITEM} ${INSTALL_DIR}/${newScriptName})
file(RENAME ${INSTALL_DIR}/${scriptName} ${INSTALL_DIR}/${newScriptName})
endforeach() endforeach()
# Once the full tree is installed, perform configurations # Once the full tree is installed, perform configurations