Maybe make scripts work?

This commit is contained in:
Vincent Stumpf 2023-04-24 17:15:38 +00:00
parent e1b9b0d9b3
commit ff86c7b9d1
3 changed files with 22 additions and 1 deletions

View File

@ -19,4 +19,3 @@ function(copy_import_files SRC_DIR DST_DIR FILE_LIST)
file(COPY ${SRC_DIR}/${FILE} DESTINATION ${DST_DIR}) file(COPY ${SRC_DIR}/${FILE} DESTINATION ${DST_DIR})
endforeach() endforeach()
endfunction() endfunction()

View File

@ -67,3 +67,4 @@ add_subdirectory(db)
add_subdirectory(conf) add_subdirectory(conf)
add_subdirectory(3rdparty) add_subdirectory(3rdparty)
add_subdirectory(src) add_subdirectory(src)
add_subdirectory(tools)

21
tools/CMakeLists.txt Normal file
View File

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