參考資訊:
https://docs.lvgl.io/master/
https://github.com/lvgl/lvgl
https://zhuanlan.zhihu.com/p/1887804194586617591
https://lvgl.100ask.net/master/details/libs/freetype.html
https://download-mirror.savannah.gnu.org/releases/freetype/
https://docs.lvgl.io/master/details/integration/driver/sdl.html
步驟如下:
$ cd
$ git clone https://github.com/lvgl/lvgl --recursive
$ cd lvgl
$ wget https://download-mirror.savannah.gnu.org/releases/freetype/freetype-2.13.3.tar.gz
$ tar xvf freetype-2.13.3.tar.gz
$ vim lv_conf.h
#define LV_USE_SDL 1
#define LV_SDL_INCLUDE_PATH <SDL2/SDL.h>
#define SDL_HOR_RES 320
#define SDL_VER_RES 240
#define LV_USE_FREETYPE 1
#define LV_USE_FONT_UTF8 1
$ vim CMakeLists.txt +45
add_subdirectory(freetype-2.13.3)
include_directories(freetype-2/include)
target_link_libraries(lvgl PUBLIC freetype)
$ mkdir build
$ cd build
$ cmake ..
$ make -j4
$ sudo make install