Added texture, assets, tools and texture loading.
This commit is contained in:
27
src/dawntools/file/CMakeLists.txt
Normal file
27
src/dawntools/file/CMakeLists.txt
Normal 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()
|
Reference in New Issue
Block a user