taisei/scripts/package_data.cmake.in
2017-09-17 17:44:03 +03:00

12 lines
351 B
CMake

message(STATUS "Compressing game data")
execute_process(
COMMAND @CMAKE_COMMAND@ -E tar cf @GAME_RESOURCES_ZIP@ --format=zip @GAME_RESOURCES_DIRS@
WORKING_DIRECTORY @CMAKE_CURRENT_SOURCE_DIR@
RESULT_VARIABLE ERR
)
if(NOT ${ERR} EQUAL 0)
message(FATAL_ERROR "Failed to package \"@GAME_RESOURCES_ZIP@\" (error code: ${ERR})")
endif()