1
0
Fork 0

fontgen: changes to allow CMake to work from other project

This commit is contained in:
Yehoshua Pesach Wallach 2022-04-28 23:04:45 +03:00 committed by JF
parent b6b322efdd
commit a2057ebc6f

View file

@ -4,16 +4,16 @@ set(FONTS jetbrains_mono_42 jetbrains_mono_76 jetbrains_mono_bold_20
jetbrains_mono_extrabold_compressed lv_font_navi_80 lv_font_sys_48 jetbrains_mono_extrabold_compressed lv_font_navi_80 lv_font_sys_48
open_sans_light) open_sans_light)
find_program(LV_FONT_CONV "lv_font_conv" NO_CACHE REQUIRED) find_program(LV_FONT_CONV "lv_font_conv" NO_CACHE REQUIRED)
configure_file(displayapp/fonts/jetbrains_mono_bold_20.c_zero.patch configure_file(${CMAKE_CURRENT_LIST_DIR}/jetbrains_mono_bold_20.c_zero.patch
displayapp/fonts/jetbrains_mono_bold_20.c_zero.patch COPYONLY) displayapp/fonts/jetbrains_mono_bold_20.c_zero.patch COPYONLY)
foreach(FONT ${FONTS}) foreach(FONT ${FONTS})
set_source_files_properties(displayapp/fonts/${FONT}.c set_source_files_properties(displayapp/fonts/${FONT}.c
PROPERTIES GENERATED TRUE) PROPERTIES GENERATED TRUE)
add_custom_command(OUTPUT displayapp/fonts/${FONT}.c add_custom_command(OUTPUT displayapp/fonts/${FONT}.c
COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/displayapp/fonts/generate.py COMMAND python ${CMAKE_CURRENT_LIST_DIR}/generate.py
-f ${FONT} ${CMAKE_CURRENT_SOURCE_DIR}/displayapp/fonts/fonts.json -f ${FONT} ${CMAKE_CURRENT_LIST_DIR}/fonts.json
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/displayapp/fonts/fonts.json DEPENDS ${CMAKE_CURRENT_LIST_DIR}/fonts.json
WORKING_DIRECTORY displayapp/fonts WORKING_DIRECTORY displayapp/fonts
) )
endforeach() endforeach()