Skip to content

Commit

Permalink
feat(cmake): Make LVGL version available for all CMake environments
Browse files Browse the repository at this point in the history
  • Loading branch information
tore-espressif committed Aug 8, 2024
1 parent 1c4d84e commit 25c6346
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
7 changes: 1 addition & 6 deletions env_support/cmake/custom.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
set(LVGL_VERSION_MAJOR "9")
set(LVGL_VERSION_MINOR "1")
set(LVGL_VERSION_PATCH "1")
set(LVGL_VERSION_INFO "dev")
set(LVGL_VERSION ${LVGL_VERSION_MAJOR}.${LVGL_VERSION_MINOR}.${LVGL_VERSION_PATCH})
set(LVGL_SOVERSION ${LVGL_VERSION_MAJOR})
include("${CMAKE_CURRENT_LIST_DIR}/version.cmake")

# Option to define LV_LVGL_H_INCLUDE_SIMPLE, default: ON
option(LV_LVGL_H_INCLUDE_SIMPLE
Expand Down
2 changes: 2 additions & 0 deletions env_support/cmake/esp.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include("${CMAKE_CURRENT_LIST_DIR}/version.cmake")

file(GLOB_RECURSE SOURCES ${LVGL_ROOT_DIR}/src/*.c ${LVGL_ROOT_DIR}/src/*.cpp)

idf_build_get_property(LV_MICROPYTHON LV_MICROPYTHON)
Expand Down
2 changes: 2 additions & 0 deletions env_support/cmake/micropython.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include("${CMAKE_CURRENT_LIST_DIR}/version.cmake")

file(GLOB_RECURSE SOURCES ${LVGL_ROOT_DIR}/src/*.c)
file(GLOB_RECURSE EXAMPLE_SOURCES ${LVGL_ROOT_DIR}/examples/*.c)

Expand Down
8 changes: 8 additions & 0 deletions env_support/cmake/version.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set(LVGL_VERSION_MAJOR "9")
set(LVGL_VERSION_MINOR "1")
set(LVGL_VERSION_PATCH "1")
set(LVGL_VERSION_INFO "dev")

set(LVGL_VERSION ${LVGL_VERSION_MAJOR}.${LVGL_VERSION_MINOR}.${LVGL_VERSION_PATCH}) # This is a CMake variable
set(ENV{LVGL_VERSION} ${LVGL_VERSION}) # This is exported Environmental variable
set(LVGL_SOVERSION ${LVGL_VERSION_MAJOR})
1 change: 1 addition & 0 deletions env_support/cmake/zephyr.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
if(CONFIG_LVGL)
include("${CMAKE_CURRENT_LIST_DIR}/version.cmake")

zephyr_include_directories(${ZEPHYR_BASE}/lib/gui/lvgl)

Expand Down

0 comments on commit 25c6346

Please sign in to comment.