mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
lvgl/cmake: link external library if required
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
This commit is contained in:
parent
bdc0c006bd
commit
5165ad8422
1 changed files with 40 additions and 0 deletions
|
|
@ -74,6 +74,46 @@ if(CONFIG_GRAPHICS_LVGL)
|
|||
target_compile_definitions(lvgl PRIVATE "LV_ASSERT_HANDLER=ASSERT(0)\;")
|
||||
endif()
|
||||
|
||||
if(CONFIG_LV_USE_FREETYPE)
|
||||
if(NOT CONFIG_LIB_FREETYPE)
|
||||
message(WARNING "LIB_FREETYPE is not enabled")
|
||||
endif()
|
||||
target_link_libraries(lvgl PRIVATE freetype)
|
||||
nuttx_add_dependencies(TARGET lvgl DEPENDS freetype)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LV_USE_LIBPNG)
|
||||
if(NOT CONFIG_LIB_PNG)
|
||||
message(WARNING "LIB_PNG is not enabled")
|
||||
endif()
|
||||
target_link_libraries(lvgl PRIVATE png_static)
|
||||
nuttx_add_dependencies(TARGET lvgl DEPENDS png_static)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LV_USE_LIBWEBP)
|
||||
if(NOT CONFIG_LIB_WEBP)
|
||||
message(WARNING "LIB_WEBP is not enabled")
|
||||
endif()
|
||||
target_link_libraries(lvgl PRIVATE webpdecoder)
|
||||
nuttx_add_dependencies(TARGET lvgl DEPENDS webpdecoder)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LV_USE_FFMPEG)
|
||||
message(FATAL_ERROR "FFMPEG is not supported yet")
|
||||
endif()
|
||||
|
||||
if(CONFIG_LV_USE_RLOTTIE)
|
||||
message(FATAL_ERROR "RLOTTIE is not supported yet")
|
||||
endif()
|
||||
|
||||
if(CONFIG_LV_USE_LIBJPEG_TURBO)
|
||||
if(NOT CONFIG_LIB_JPEG_TURBO)
|
||||
message(WARNING "LIB_JPEG_TURBO is not enabled")
|
||||
endif()
|
||||
target_link_libraries(lvgl PRIVATE turbojpeg-static)
|
||||
nuttx_add_dependencies(TARGET lvgl DEPENDS turbojpeg-static)
|
||||
endif()
|
||||
|
||||
# allow to include via lvgl/lvgl.h
|
||||
target_include_directories(lvgl PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue