1 macro(add_bitmaps_target targetname filter width format)
3 file(GLOB bitmaps ${filter})
4 foreach(bitmap ${bitmaps})
5 get_filename_component(target ${bitmap} NAME_WE)
6 set(target ${target}.lbm)
9 COMMAND ${PYTHON_EXECUTABLE} ${RADIO_DIRECTORY}/util/img2lbm.py ${bitmap} ${target} ${width} ${format} ${ARGN}
12 list(APPEND bitmaps_files ${target})
14 add_custom_target(${targetname} DEPENDS ${bitmaps_files})
15 endmacro(add_bitmaps_target)
17 macro(add_truetype_font_target radio name font size offset)
18 set(target ${RADIO_SRC_DIRECTORY}/fonts/${radio}/font_${name})
19 add_custom_target(ttf_${radio}_${name}
20 COMMAND ${PYTHON_EXECUTABLE} ${RADIO_DIRECTORY}/util/font2png.py ${font} ${size} ${offset} ${target}
21 WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
23 set(ttf_${radio}_fonts_targets ${ttf_${radio}_fonts_targets} ttf_${radio}_${name})
24 endmacro(add_truetype_font_target)