- Created `tactility-headless` to support ESP32 firmwares that don't require graphics - `tactility` subproject now contains both PC and ESP32 code (to avoid having to split up `tactility` and `tactility-headless` into separate projects, which would result in a very complex dependency tree) - `tactility` subproject is now defined as component for ESP32 and as regular module for PC - Improvements for dispatcher - Added `project-structure.puml` to docs - `Gui` service now depends on `Loader` service instead of the reverse - Added `statusbar_updater` service for updating Wi-Fi and SD card icons
49 lines
1.3 KiB
CMake
49 lines
1.3 KiB
CMake
cmake_minimum_required(VERSION 3.16)
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
if (DEFINED ENV{ESP_IDF_VERSION})
|
|
file(GLOB_RECURSE SOURCE_FILES src/*.c)
|
|
|
|
idf_component_register(
|
|
SRCS ${SOURCE_FILES}
|
|
INCLUDE_DIRS "src/"
|
|
REQUIRES esp_wifi nvs_flash spiffs driver newlib
|
|
)
|
|
|
|
set(ASSETS_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../data/assets")
|
|
spiffs_create_partition_image(assets ${ASSETS_SRC_DIR} FLASH_IN_PROJECT)
|
|
|
|
set(CONFIG_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../data/config")
|
|
spiffs_create_partition_image(config ${CONFIG_SRC_DIR} FLASH_IN_PROJECT)
|
|
|
|
target_link_libraries(${COMPONENT_LIB}
|
|
PUBLIC tactility-core
|
|
)
|
|
|
|
add_definitions(-DESP_PLATFORM)
|
|
else()
|
|
file(GLOB_RECURSE SOURCES "src/*.c")
|
|
file(GLOB_RECURSE HEADERS "src/*.h")
|
|
|
|
add_library(tactility-headless OBJECT)
|
|
target_sources(tactility-headless
|
|
PRIVATE ${SOURCES}
|
|
PUBLIC ${HEADERS}
|
|
)
|
|
|
|
target_include_directories(tactility-headless
|
|
PRIVATE src/
|
|
INTERFACE src/
|
|
)
|
|
|
|
add_definitions(-D_Nullable=)
|
|
add_definitions(-D_Nonnull=)
|
|
target_link_libraries(tactility-headless
|
|
PUBLIC tactility-core
|
|
PUBLIC freertos_kernel
|
|
)
|
|
endif()
|