1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-11-30 13:04:33 +00:00

Use configure_file substitution

This commit is contained in:
Evil Eye 2025-10-06 20:23:36 +02:00
parent c6c515f770
commit 10c96ff68d
2 changed files with 5 additions and 7 deletions

View file

@ -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")

View file

@ -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