From 49b30a7d5ac7e2ac9c157eaeadda806b92d4e153 Mon Sep 17 00:00:00 2001 From: Kieran Kihn <114803508+kierankihn@users.noreply.github.com> Date: Thu, 11 Dec 2025 22:47:54 +0800 Subject: [PATCH] chore: copy assets to output directory post-build - Added logic to copy the `assets` directory to the output folder for `uno-client` and `uno-server`. --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 245ed9e..fdd1fac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,12 +58,19 @@ target_link_libraries(uno-server PRIVATE uno-game-lib) # Google Test add_subdirectory(test) -# 复制动态库 + foreach (target uno-client uno-server) + # 复制动态库 add_custom_command(TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $ COMMAND_EXPAND_LISTS ) + # 复制资源文件 + add_custom_command(TARGET ${target} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory + ${CMAKE_SOURCE_DIR}/assets + $/assets + ) endforeach () \ No newline at end of file