# Copyright (c) 2025 Dominic Msters # # This software is released under the MIT License. # https://opensource.org/licenses/MIT add_subdirectory(run_python) # Function that adds an asset to be compiled function(add_asset ASSET_TYPE ASSET_PATH) set(FULL_ASSET_PATH "${CMAKE_CURRENT_LIST_DIR}/${ASSET_PATH}") string(JOIN "%" ASSETS_ARGS ${ARGN}) list(APPEND DUSK_ASSETS "${ASSET_TYPE}#${FULL_ASSET_PATH}#${ASSETS_ARGS}" ) set(DUSK_ASSETS ${DUSK_ASSETS} CACHE INTERNAL ${DUSK_CACHE_TARGET}) endfunction() function(add_defs INPUT_PATH OUTPUT_NAME_RELATIVE) set(DUSK_DEFS_TARGET_NAME "DUSK_DEFS_${OUTPUT_NAME_RELATIVE}") dusk_run_python( ${DUSK_DEFS_TARGET_NAME} tools.envtoh --env ${INPUT_PATH} --output ${DUSK_BUILT_ASSETS_DIR}/${OUTPUT_NAME_RELATIVE} ) add_dependencies(${DUSK_LIBRARY_TARGET_NAME} ${DUSK_DEFS_TARGET_NAME}) endfunction()