mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
## Time & Date - Added time to statusbar widget - Added Time & Date Settings app - Added TimeZone app for selecting TimeZone - Added `tt::time` namespace with timezone code ## Other changes - Added `SystemEvent` to publish/subscribe to system wide (e.g. for init code, but also for time settings changes) - Changed the way the statusbar widget works: now there's only 1 that gets shown/hidden, instead of 1 instance per app instance. - Moved `lowercase()` function to new namespace: `tt::string` - Increased T-Deck flash & PSRAM SPI frequencies to 120 MHz (from 80 MHz) - Temporary work-around (+ TODO item) for LVGL stack size (issue with WiFi app) - Suppress T-Deck keystroke debugging to debug level (privacy issue) - Improved SDL dependency wiring in various `CMakeLists.txt` - `Loader` service had some variables renamed to the newer C++ style (from previous C style)
109 lines
3.2 KiB
CMake
109 lines
3.2 KiB
CMake
cmake_minimum_required(VERSION 3.20)
|
|
|
|
add_definitions(-DTT_DEBUG)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
set(CMAKE_ASM_COMPILE_OBJECT "${CMAKE_CXX_COMPILER_TARGET}")
|
|
|
|
include("Buildscripts/logo.cmake")
|
|
|
|
if (DEFINED ENV{ESP_IDF_VERSION})
|
|
message("Building with ESP-IDF v$ENV{ESP_IDF_VERSION}")
|
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
|
|
|
add_definitions(-DESP_TARGET)
|
|
add_compile_definitions(ESP_TARGET)
|
|
|
|
set(COMPONENTS App)
|
|
set(EXTRA_COMPONENT_DIRS
|
|
"Boards"
|
|
"App"
|
|
"Tactility"
|
|
"TactilityC"
|
|
"TactilityCore"
|
|
"TactilityHeadless"
|
|
"Libraries/esp_lvgl_port"
|
|
"Libraries/elf_loader"
|
|
"Libraries/lvgl"
|
|
"Libraries/lv_screenshot"
|
|
"Libraries/QRCode"
|
|
)
|
|
|
|
set(EXCLUDE_COMPONENTS "Simulator")
|
|
|
|
# Non-ESP32 boards
|
|
if(NOT "${IDF_TARGET}" STREQUAL "esp32")
|
|
set(EXCLUDE_COMPONENTS "YellowBoard")
|
|
set(EXCLUDE_COMPONENTS "M5stackCore2")
|
|
endif()
|
|
|
|
# Non-ESP32-S3 boards
|
|
if(NOT "${IDF_TARGET}" STREQUAL "esp32s3")
|
|
set(EXCLUDE_COMPONENTS "LilygoTdeck")
|
|
set(EXCLUDE_COMPONENTS "M5stackCoreS3")
|
|
endif()
|
|
|
|
# LVGL
|
|
get_filename_component(
|
|
LVGL_CONFIG_FULL_PATH Libraries/lvgl_conf ABSOLUTE
|
|
)
|
|
|
|
add_compile_definitions(LV_CONF_PATH="${LVGL_CONFIG_FULL_PATH}/lv_conf_kconfig.h")
|
|
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=esp_panic_handler" APPEND)
|
|
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=esp_log_write" APPEND)
|
|
|
|
file(READ version.txt TACTILITY_VERSION)
|
|
add_compile_definitions(TT_VERSION="${TACTILITY_VERSION}")
|
|
else()
|
|
message("Building for sim target")
|
|
endif()
|
|
|
|
project(Tactility)
|
|
|
|
# Defined as regular project for PC and component for ESP
|
|
if (NOT DEFINED ENV{ESP_IDF_VERSION})
|
|
add_subdirectory(Tactility)
|
|
add_subdirectory(TactilityCore)
|
|
add_subdirectory(TactilityHeadless)
|
|
add_subdirectory(Boards/Simulator)
|
|
endif()
|
|
|
|
if (NOT DEFINED ENV{ESP_IDF_VERSION})
|
|
# FreeRTOS
|
|
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)
|
|
add_subdirectory(Libraries/lv_screenshot)
|
|
add_subdirectory(Libraries/QRCode)
|
|
target_compile_definitions(freertos_kernel PUBLIC "projCOVERAGE_TEST=0")
|
|
target_include_directories(freertos_kernel
|
|
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(App)
|
|
endif()
|
|
|
|
# Tests
|
|
add_subdirectory(Tests)
|
|
|
|
# LVGL
|
|
add_subdirectory(Libraries/lvgl) # Added as idf component for ESP and as library for other targets
|
|
include_directories(lvgl PUBLIC ${PROJECT_SOURCE_DIR}/Libraries/lvgl_conf)
|
|
if (NOT DEFINED ENV{SKIP_SDL})
|
|
find_package(SDL2 REQUIRED CONFIG)
|
|
target_include_directories(lvgl PUBLIC ${SDL2_INCLUDE_DIRS})
|
|
target_link_libraries(lvgl
|
|
PRIVATE ${SDL2_LIBRARIES}
|
|
)
|
|
endif()
|
|
target_compile_definitions(lvgl PUBLIC "-DLV_CONF_PATH=\"${PROJECT_SOURCE_DIR}/Libraries/lvgl_conf/lv_conf_simulator.h\"")
|
|
endif()
|