file(MAKE_DIRECTORY "${DESTINATION}") file(GLOB definitions "${SOURCE}/*.toml") foreach(definition IN LISTS definitions) get_filename_component(name "${definition}" NAME) configure_file("${definition}" "${DESTINATION}/${name}" COPYONLY) endforeach() # Remove only stale definitions in the build's asset directory. file(GLOB old_definitions "${DESTINATION}/*.toml") foreach(definition IN LISTS old_definitions) get_filename_component(name "${definition}" NAME) if(NOT EXISTS "${SOURCE}/${name}") file(REMOVE "${definition}") endif() endforeach()