From ff86c7b9d19accdf8dfb37a6a42d357ed71c6f0f Mon Sep 17 00:00:00 2001 From: Vincent Stumpf Date: Mon, 24 Apr 2023 17:15:38 +0000 Subject: [PATCH] Maybe make scripts work? --- 3rdparty/cmake/CopyImportFiles.cmake | 1 - CMakeLists.txt | 1 + tools/CMakeLists.txt | 21 +++++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 tools/CMakeLists.txt diff --git a/3rdparty/cmake/CopyImportFiles.cmake b/3rdparty/cmake/CopyImportFiles.cmake index 73ef39dc4c..a5daa0e871 100644 --- a/3rdparty/cmake/CopyImportFiles.cmake +++ b/3rdparty/cmake/CopyImportFiles.cmake @@ -19,4 +19,3 @@ function(copy_import_files SRC_DIR DST_DIR FILE_LIST) file(COPY ${SRC_DIR}/${FILE} DESTINATION ${DST_DIR}) endforeach() endfunction() - diff --git a/CMakeLists.txt b/CMakeLists.txt index 1deab2cf50..5aa7249e0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,3 +67,4 @@ add_subdirectory(db) add_subdirectory(conf) add_subdirectory(3rdparty) add_subdirectory(src) +add_subdirectory(tools) \ No newline at end of file diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt new file mode 100644 index 0000000000..67442585e8 --- /dev/null +++ b/tools/CMakeLists.txt @@ -0,0 +1,21 @@ + +add_custom_target(scripts) + +function(copy_to_source_dir FILENAMES) + foreach(FILE ${FILENAMES}) + add_custom_command( + TARGET scripts POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${FILE}) + endforeach() +endfunction() + +set(FILES_TO_COPY +"serv.bat" +"logserv.bat" +"charserv.bat" +"mapserv.bat" + "runserver.bat" + +) \ No newline at end of file