Unified AppEsp and AppSim into a single App module (#94)
This commit is contained in:
committed by
GitHub
parent
d7b151ab88
commit
03d14ef74b
+15
-7
@@ -16,10 +16,10 @@ if (DEFINED ENV{ESP_IDF_VERSION})
|
||||
add_definitions(-DARDUINO_M5STACK_CORE2)
|
||||
add_compile_definitions(ARDUINO_M5STACK_CORE2)
|
||||
|
||||
set(COMPONENTS AppEsp32)
|
||||
set(COMPONENTS App)
|
||||
set(EXTRA_COMPONENT_DIRS
|
||||
"Boards"
|
||||
"AppEsp32"
|
||||
"App"
|
||||
"Tactility"
|
||||
"TactilityHeadless"
|
||||
"Libraries/esp_lvgl_port"
|
||||
@@ -35,6 +35,10 @@ if (DEFINED ENV{ESP_IDF_VERSION})
|
||||
set(EXCLUDE_COMPONENTS "M5stackCoreS3")
|
||||
endif()
|
||||
|
||||
if(NOT "${IDF_TARGET}" STREQUAL "Simulator")
|
||||
set(EXCLUDE_COMPONENTS "Simulator")
|
||||
endif()
|
||||
|
||||
# ESP32-S3 boards
|
||||
if(NOT "${IDF_TARGET}" STREQUAL "esp32s3")
|
||||
set(EXCLUDE_COMPONENTS "LilygoTdeck")
|
||||
@@ -50,6 +54,7 @@ project(TactilityRoot)
|
||||
if (NOT DEFINED ENV{ESP_IDF_VERSION})
|
||||
add_subdirectory(Tactility)
|
||||
add_subdirectory(TactilityHeadless)
|
||||
add_subdirectory(Boards/Simulator)
|
||||
endif()
|
||||
|
||||
add_subdirectory(TactilityCore)
|
||||
@@ -58,30 +63,32 @@ add_subdirectory(Libraries/lv_screenshot)
|
||||
|
||||
if (NOT DEFINED ENV{ESP_IDF_VERSION})
|
||||
# FreeRTOS
|
||||
set(FREERTOS_CONFIG_FILE_DIRECTORY ${PROJECT_SOURCE_DIR}/AppSim/Source CACHE STRING "")
|
||||
set(FREERTOS_CONFIG_FILE_DIRECTORY ${PROJECT_SOURCE_DIR}/Boards/Simulator/Source CACHE STRING "")
|
||||
set(FREERTOS_PORT GCC_POSIX CACHE STRING "")
|
||||
add_subdirectory(Libraries/FreeRTOS-Kernel)
|
||||
target_compile_definitions(freertos_kernel PUBLIC "projCOVERAGE_TEST=0")
|
||||
target_include_directories(freertos_kernel
|
||||
PUBLIC AppSim/Source # for FreeRTOSConfig.h
|
||||
PUBLIC Boards/Simulator/Source # for FreeRTOSConfig.h
|
||||
)
|
||||
|
||||
# EmbedTLS
|
||||
set(ENABLE_TESTING OFF)
|
||||
set(ENABLE_PROGRAMS OFF)
|
||||
add_subdirectory(Libraries/mbedtls)
|
||||
|
||||
# Sim app
|
||||
if (NOT DEFINED ENV{SKIP_SDL})
|
||||
add_subdirectory(AppSim)
|
||||
add_subdirectory(App)
|
||||
endif()
|
||||
|
||||
# Tests
|
||||
add_subdirectory(Tests)
|
||||
|
||||
# SDL & LVGL
|
||||
set(LV_CONF_PATH ${PROJECT_SOURCE_DIR}/AppSim/Source/lv_conf.h)
|
||||
set(LV_CONF_PATH ${PROJECT_SOURCE_DIR}/Boards/Simulator/Source/lv_conf.h)
|
||||
add_subdirectory(Libraries/lvgl) # Added as idf component for ESP and as library for other targets
|
||||
target_include_directories(lvgl
|
||||
PUBLIC AppSim/Source # for lv_conf.h and lv_drv_conf.h
|
||||
PUBLIC Boards/Source # for lv_conf.h and lv_drv_conf.h
|
||||
)
|
||||
|
||||
# TODO: This is a temporary skipping option for running unit tests
|
||||
@@ -108,6 +115,7 @@ if (NOT DEFINED ENV{ESP_IDF_VERSION})
|
||||
find_package(SDL2_image REQUIRED)
|
||||
target_include_directories(lvgl PUBLIC ${SDL2_IMAGE_INCLUDE_DIRS})
|
||||
target_link_libraries(AppSim ${SDL2_IMAGE_LIBRARIES})
|
||||
target_link_libraries(Simulator ${SDL2_IMAGE_LIBRARIES})
|
||||
endif(LV_USE_DRAW_SDL)
|
||||
|
||||
if (LV_USE_LIBPNG)
|
||||
|
||||
Reference in New Issue
Block a user