townengine/bin/prep-embed.sh

9 lines
311 B
Bash

#!/bin/env sh
set -e
# packages embedded resources with objcopy, so that it is more portable
# ld.lld on windows doesn't recognize --format binary, sadly
objdump=$(objdump -i)
bdfname=$(echo "$objdump" | sed -n 2p)
objcopy -I binary -O "$bdfname" share/assets/Dernyns256.ttf "$CMAKE_CURRENT_BINARY_DIR/font.o"