mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-30 16:04:38 +00:00
Use configure_file substitution
This commit is contained in:
parent
c6c515f770
commit
10c96ff68d
2 changed files with 5 additions and 7 deletions
|
|
@ -38,10 +38,6 @@ endforeach (f)
|
||||||
|
|
||||||
# Concat data/builtin.omwscripts and data-mw/builtin-extra.omwscripts to create vfs-mw/builtin.omwscripts
|
# 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(builtinBase "${CMAKE_CURRENT_SOURCE_DIR}/../data/builtin.omwscripts")
|
||||||
set(builtinExtra "${CMAKE_CURRENT_SOURCE_DIR}/builtin-extra.omwscripts")
|
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${builtinBase}")
|
||||||
set(builtinTemp "${CMAKE_BINARY_DIR}/tmp")
|
file(READ "${builtinBase}" BUILTIN_SCRIPTS)
|
||||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${builtinBase}" "${builtinExtra}")
|
configure_resource_file("${CMAKE_CURRENT_SOURCE_DIR}/builtin-extra.omwscripts" "${OPENMW_RESOURCES_ROOT}" "resources/vfs-mw/builtin.omwscripts")
|
||||||
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")
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
@BUILTIN_SCRIPTS@
|
||||||
|
|
||||||
# Game specific scripts to append to builtin.omwscripts
|
# Game specific scripts to append to builtin.omwscripts
|
||||||
GLOBAL: scripts/omw/cellhandlers.lua
|
GLOBAL: scripts/omw/cellhandlers.lua
|
||||||
GLOBAL: scripts/omw/combat/global.lua
|
GLOBAL: scripts/omw/combat/global.lua
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue