Doing some code reshuffling
This commit is contained in:
@ -9,4 +9,27 @@ function(tool_assets args)
|
||||
DEPENDS ${ARGV}
|
||||
COMMENT "Compressing Assets"
|
||||
)
|
||||
endfunction()
|
||||
|
||||
function(tool_copy target)
|
||||
math(EXPR CARGSN "${ARGC} - 1")
|
||||
set(LOOP_DEPENDENCIES)
|
||||
|
||||
foreach(index RANGE 1 ${CARGSN} 2)
|
||||
math(EXPR indexnext "${index} + 1")
|
||||
set(LOOP_TARGET "item_${target}_${index}")
|
||||
|
||||
LIST(GET ARGV ${index} from)
|
||||
LIST(GET ARGV ${indexnext} to)
|
||||
LIST(APPEND LOOP_DEPENDENCIES ${LOOP_TARGET})
|
||||
add_custom_command(OUTPUT ${LOOP_TARGET}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${ROOT_DIR}/${ASSETS_DIR}/${from}" "${ASSETS_DIR}/${to}"
|
||||
COMMENT "Copying ${from} => ${to}"
|
||||
)
|
||||
endforeach()
|
||||
|
||||
add_custom_target(${target}
|
||||
DEPENDS ${MY_LIST}
|
||||
COMMENT "Copying ${FILE_NAME}"
|
||||
)
|
||||
endfunction()
|
@ -6,6 +6,6 @@
|
||||
function(tool_vn_character DEP_NAME IN OUT)
|
||||
add_custom_target(${DEP_NAME}
|
||||
COMMAND node ${TOOLS_DIR}/vn/character-sheet-generator.js --assets="${ASSETS_DIR}" --root="${ROOT_DIR}" --in="${IN}" --out="${OUT}"
|
||||
COMMENT "Adding VN Character ${FILE_NAME}"
|
||||
COMMENT "Adding VN Character ${DEP_NAME}"
|
||||
)
|
||||
endfunction()
|
Reference in New Issue
Block a user