From a0590d91ceeff9b5c45bbed73b8ffe60cb58508b Mon Sep 17 00:00:00 2001 From: Petr Mikheev Date: Sun, 3 Apr 2022 20:06:16 +0200 Subject: [PATCH] Refactor files/builtin_scripts/CMakeLists.txt --- files/builtin_scripts/CMakeLists.txt | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/files/builtin_scripts/CMakeLists.txt b/files/builtin_scripts/CMakeLists.txt index 1f140a4af1..4e1c08ee8d 100644 --- a/files/builtin_scripts/CMakeLists.txt +++ b/files/builtin_scripts/CMakeLists.txt @@ -2,29 +2,22 @@ if (NOT DEFINED OPENMW_RESOURCES_ROOT) return() endif() -# Copy resource files into the build directory -set(SDIR ${CMAKE_CURRENT_SOURCE_DIR}) -set(DDIRRELATIVE resources/vfs) -copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_RESOURCES_ROOT} ${DDIRRELATIVE} "builtin.omwscripts") +set(LUA_BUILTIN_FILES + builtin.omwscripts -set(LUA_AUX_FILES openmw_aux/util.lua openmw_aux/time.lua openmw_aux/calendar.lua -) -set(DDIRRELATIVE resources/vfs/openmw_aux) -copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_RESOURCES_ROOT} ${DDIRRELATIVE} "${LUA_AUX_FILES}") - -set(LUA_SCRIPTS_FILES scripts/omw/ai.lua scripts/omw/camera.lua scripts/omw/head_bobbing.lua scripts/omw/third_person.lua + + i18n/Calendar/en.lua ) -set(DDIRRELATIVE resources/vfs/scripts/omw) -copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_RESOURCES_ROOT} ${DDIRRELATIVE} "${LUA_SCRIPTS_FILES}") +foreach (f ${LUA_BUILTIN_FILES}) + copy_resource_file("${CMAKE_CURRENT_SOURCE_DIR}/${f}" "${OPENMW_RESOURCES_ROOT}" "resources/vfs/${f}") +endforeach (f) -set(DDIRRELATIVE resources/vfs/i18n/Calendar) -copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_RESOURCES_ROOT} ${DDIRRELATIVE} "i18n/Calendar/en.lua")