Files
YourWishesandClaude Sonnet 5.5 cad41e456b Add asset, resource system, mesh formats, color, SDL3 display and example game
Asset directory with CMake add_asset (extension dispatched), plain file asset
access, resource/resource manager with async load thread and text loader,
URI utilities, mesh format helpers, generated color header, and example game
hooks wired through the engine.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-07 20:12:40 -06:00

23 lines
759 B
CMake

# Copyright (c) 2026 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Handler that copies an asset into the built assets directory as is. Every
# handler has the signature (SOURCE RELATIVE OUT_VAR) and must set OUT_VAR, in
# the caller's scope, to the file it produces.
function(dusk_asset_copy ASSET_SOURCE ASSET_RELATIVE OUT_VAR)
set(ASSET_OUTPUT "${DUSK_BUILT_ASSETS_DIR}/${ASSET_RELATIVE}")
add_custom_command(
OUTPUT "${ASSET_OUTPUT}"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${ASSET_SOURCE}" "${ASSET_OUTPUT}"
DEPENDS "${ASSET_SOURCE}"
COMMENT "Copying asset ${ASSET_RELATIVE}"
VERBATIM
)
set(${OUT_VAR} "${ASSET_OUTPUT}" PARENT_SCOPE)
endfunction()