1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-16 04:45:17 +03:00
opentx/cmake/Bitmaps.cmake
2016-02-26 14:30:09 +01:00

22 lines
No EOL
855 B
CMake

macro(add_bitmaps_target targetname filter width format)
file(GLOB bitmaps ${filter})
foreach(bitmap ${bitmaps})
get_filename_component(target ${bitmap} NAME_WE)
set(target ${target}.lbm)
add_custom_command(
OUTPUT ${target}
COMMAND python ${RADIO_DIRECTORY}/util/img2lbm.py ${bitmap} ${target} ${width} ${format} ${ARGN}
DEPENDS ${bitmap}
)
list(APPEND bitmaps_files ${target})
endforeach()
add_custom_target(${targetname} DEPENDS ${bitmaps_files})
endmacro(add_bitmaps_target)
macro(add_truetype_font_target radio name font size bold)
set(target ${RADIO_SRC_DIRECTORY}/fonts/${radio}/font_${name})
add_custom_target(ttf_${radio}_${name}
COMMAND ${RADIO_DIRECTORY}/util/font2png.py ${font} ${size} ${bold} ${target}
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
endmacro(add_truetype_font_target)