Files
snivy/cmake/copy_resources.cmake
shweet b3c097be22
Some checks failed
Build / Build Game (push) Has been cancelled
vscode tasks, build settings, etc.
2026-03-01 01:09:02 -05:00

18 lines
578 B
CMake

if(NOT DEFINED SRC_DIR OR NOT DEFINED DST_DIR)
message(FATAL_ERROR "SRC_DIR and DST_DIR must be defined")
endif()
file(REMOVE_RECURSE "${DST_DIR}")
file(MAKE_DIRECTORY "${DST_DIR}")
# Copy all resources except characters/ contents.
file(COPY "${SRC_DIR}/" DESTINATION "${DST_DIR}"
PATTERN "characters/*" EXCLUDE)
# Copy only .zip archives from resources/characters.
file(MAKE_DIRECTORY "${DST_DIR}/characters")
file(GLOB CHARACTER_ZIPS "${SRC_DIR}/characters/*.zip")
if(CHARACTER_ZIPS)
file(COPY ${CHARACTER_ZIPS} DESTINATION "${DST_DIR}/characters")
endif()