Updated French translation (#4946)
[opentx.git] / cmake / Bitmaps.cmake
blob90929b5a925c17ad414c131859ae6c0585c709c9
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 bold)
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} ${bold} ${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)