Skip to content

Commit

Permalink
add lvgl to submodule on port/linux for CI
Browse files Browse the repository at this point in the history
compile pass for lvgl

support compile lvgl on CI
  • Loading branch information
pikasTech committed Jan 3, 2024
1 parent bef27d8 commit 6e44357
Show file tree
Hide file tree
Showing 26 changed files with 7,605 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "port/linux/package/lvgl/lvgl"]
path = port/linux/package/lvgl/lvgl
url = https://gitee.com/Lyon1998/lvgl
6 changes: 6 additions & 0 deletions port/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ IF(PIKA_CONFIG_ENABLE)
ADD_DEFINITIONS(-DPIKA_CONFIG_ENABLE)
ENDIF(PIKA_CONFIG_ENABLE)
ADD_DEFINITIONS(-DUSE_GOOGLE_TEST=1)
ADD_DEFINITIONS(-DLV_CONF_INCLUDE_SIMPLE=1)
ADD_DEFINITIONS(-DLV_LVGL_H_INCLUDE_SIMPLE=1)
ADD_DEFINITIONS(-DPIKASCRIPT=1)
set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED True)
Expand Down Expand Up @@ -34,6 +37,8 @@ include_directories(package/pikascript/pikascript-lib/PikaNN/TinyMaix/include)
include_directories(package/pikascript/pikascript-lib/PikaStdDevice)
# rbg/kcf add ---
include_directories(package/pikascript/pikascript-lib/flashdb)
include_directories(package/lvgl)
include_directories(package/lvgl/lvgl)


include_directories(test)
Expand All @@ -42,6 +47,7 @@ include_directories(config)
# include_directories(boot/demo01-led)
add_subdirectory(package/googletest)
add_subdirectory(package/pikascript)
add_subdirectory(package/lvgl)
add_subdirectory(test)
# add_subdirectory(boot/demo01-led)
# add_subdirectory(boot/demo02-add)
Expand Down
5 changes: 4 additions & 1 deletion port/linux/benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ find_package(benchmark REQUIRED)

# 链接src生成的lib库和gtest库
target_link_libraries(${BINARY} PUBLIC
-Wl,--whole-archive ${CMAKE_PROJECT_NAME}-core -Wl,--no-whole-archive
-Wl,--whole-archive
${CMAKE_PROJECT_NAME}-core
${CMAKE_PROJECT_NAME}-lvgl
-Wl,--no-whole-archive
gtest
benchmark::benchmark)
5 changes: 4 additions & 1 deletion port/linux/boot/demo06-pikamain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ set(SOURCES ${THIS_SOURCES})
add_executable(${BINARY} ${THIS_SOURCES})
# 链接src生成的lib库和gtest库
target_link_libraries(${BINARY} PUBLIC
-Wl,--whole-archive ${CMAKE_PROJECT_NAME}-core -Wl,--no-whole-archive
-Wl,--whole-archive
${CMAKE_PROJECT_NAME}-core
${CMAKE_PROJECT_NAME}-lvgl
-Wl,--no-whole-archive
)
4 changes: 2 additions & 2 deletions port/linux/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ROOT=$PWD
reset
cp config/pika_config_default.h config/pika_config.h

# git submodule init
# git submodule update
git submodule init
git submodule update
git config --unset-all core.filemode
git config --add core.filemode false
chmod +x *.sh
Expand Down
12 changes: 12 additions & 0 deletions port/linux/package/lvgl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#设置 BINARY 为项目名IndexProject
set(BINARY ${CMAKE_PROJECT_NAME})
set(CMAKE_C_FLAGS "-Wno-unused-variable")
file(GLOB_RECURSE SOURCES LIST_DIRECTORIES true *.h *.c)
set(SOURCES ${SOURCES})

link_libraries(m)

add_library(${BINARY}-lvgl
STATIC
${SOURCES}
)
Loading

0 comments on commit 6e44357

Please sign in to comment.