Add TXRSSI and TXLQI sensors to FrSky D8/D16/LBT when using MULTI (#7128)
[opentx.git] / cmake / Bitmaps.cmake
blobf5281c0d3b129d45ca605b51dd844e7ee9a00790
1 macro(add_bitmaps_target targetname filter width format)
2   set(bitmaps_files)
3   file(GLOB bitmaps ${filter})
4   foreach(bitmap ${bitmaps})
5     get_filename_component(target ${bitmap} NAME_WE)
6     set(target ${target}.lbm)
7     add_custom_command(
8       OUTPUT ${target}
9       COMMAND ${PYTHON_EXECUTABLE} ${RADIO_DIRECTORY}/util/img2lbm.py ${bitmap} ${target} ${width} ${format} ${ARGN}
10       DEPENDS ${bitmap}
11     )
12     list(APPEND bitmaps_files ${target})
13   endforeach()
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}
22   )
23   set(ttf_${radio}_fonts_targets ${ttf_${radio}_fonts_targets} ttf_${radio}_${name})
24 endmacro(add_truetype_font_target)