Added texture, assets, tools and texture loading.

This commit is contained in:
2022-10-20 21:50:52 -07:00
parent 80d6cba854
commit 043873cc2d
38 changed files with 1626 additions and 15 deletions

View File

@ -0,0 +1,27 @@
# Copyright (c) 2022 Dominic Msters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
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 "${from}" "${ASSETS_BUILD_DIR}/${to}"
COMMENT "Copying ${from} => ${to}"
)
endforeach()
add_custom_target(${target}
DEPENDS ${LOOP_DEPENDENCIES}
COMMENT "Creating dependency set ${target}"
)
endfunction()