From 10c96ff68ddac4ed0b8231efef8f7a82b57de5c2 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Mon, 6 Oct 2025 20:23:36 +0200 Subject: [PATCH] Use configure_file substitution --- files/data-mw/CMakeLists.txt | 10 +++------- files/data-mw/builtin-extra.omwscripts | 2 ++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/files/data-mw/CMakeLists.txt b/files/data-mw/CMakeLists.txt index 2c0a589bd6..620a40bc02 100644 --- a/files/data-mw/CMakeLists.txt +++ b/files/data-mw/CMakeLists.txt @@ -38,10 +38,6 @@ endforeach (f) # Concat data/builtin.omwscripts and data-mw/builtin-extra.omwscripts to create vfs-mw/builtin.omwscripts set(builtinBase "${CMAKE_CURRENT_SOURCE_DIR}/../data/builtin.omwscripts") -set(builtinExtra "${CMAKE_CURRENT_SOURCE_DIR}/builtin-extra.omwscripts") -set(builtinTemp "${CMAKE_BINARY_DIR}/tmp") -set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${builtinBase}" "${builtinExtra}") -file(COPY "${builtinBase}" DESTINATION "${builtinTemp}") -file(READ "${builtinExtra}" builtinContents) -file(APPEND "${builtinTemp}/builtin.omwscripts" "${builtinContents}") -copy_resource_file("${builtinTemp}/builtin.omwscripts" "${OPENMW_RESOURCES_ROOT}" "resources/vfs-mw/builtin.omwscripts") +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${builtinBase}") +file(READ "${builtinBase}" BUILTIN_SCRIPTS) +configure_resource_file("${CMAKE_CURRENT_SOURCE_DIR}/builtin-extra.omwscripts" "${OPENMW_RESOURCES_ROOT}" "resources/vfs-mw/builtin.omwscripts") diff --git a/files/data-mw/builtin-extra.omwscripts b/files/data-mw/builtin-extra.omwscripts index 0d63fd1dde..ffcadbf69f 100644 --- a/files/data-mw/builtin-extra.omwscripts +++ b/files/data-mw/builtin-extra.omwscripts @@ -1,3 +1,5 @@ +@BUILTIN_SCRIPTS@ + # Game specific scripts to append to builtin.omwscripts GLOBAL: scripts/omw/cellhandlers.lua GLOBAL: scripts/omw/combat/global.lua