Tactiliest/Tactility/CMakeLists.txt
Ken Van Hoeylandt a4d15b2a1e
Some checks failed
Build Firmware / cyd-2432s024c (push) Has been cancelled
Build Firmware / cyd-2432s028r (push) Has been cancelled
Build Firmware / cyd-e32r28t (push) Has been cancelled
Build Firmware / cyd-2432s032c (push) Has been cancelled
Build Firmware / cyd-jc2432w328c (push) Has been cancelled
Build Firmware / cyd-8048s043c (push) Has been cancelled
Build Firmware / cyd-jc8048w550c (push) Has been cancelled
Build Firmware / cyd-4848s040c (push) Has been cancelled
Build Firmware / elecrow-crowpanel-advance-28 (push) Has been cancelled
Build Firmware / waveshare-s3-touch-43 (push) Has been cancelled
Build Firmware / elecrow-crowpanel-advance-35 (push) Has been cancelled
Build Firmware / elecrow-crowpanel-advance-50 (push) Has been cancelled
Build Firmware / elecrow-crowpanel-basic-28 (push) Has been cancelled
Build Firmware / elecrow-crowpanel-basic-35 (push) Has been cancelled
Build Firmware / elecrow-crowpanel-basic-50 (push) Has been cancelled
Build Firmware / lilygo-tdeck (push) Has been cancelled
Build Firmware / lilygo-tlora-pager (push) Has been cancelled
Build Firmware / m5stack-cardputer (push) Has been cancelled
Build Firmware / m5stack-core2 (push) Has been cancelled
Build Firmware / m5stack-cores3 (push) Has been cancelled
Build Firmware / unphone (push) Has been cancelled
Build Firmware / waveshare-s3-touch-lcd-147 (push) Has been cancelled
Build Firmware / waveshare-s3-touch-lcd-128 (push) Has been cancelled
Build Firmware / waveshare-s3-lcd-13 (push) Has been cancelled
Build SDK / esp32 (push) Has been cancelled
Build SDK / esp32s3 (push) Has been cancelled
Build Simulator / Build-Simulator-Linux (push) Has been cancelled
Build Simulator / Build-Simulator-macOS (push) Has been cancelled
Tests / Run (push) Has been cancelled
Add esp_http_client and expose it to TactilityC (#341)
2025-09-20 13:07:34 +02:00

80 lines
1.8 KiB
CMake

cmake_minimum_required(VERSION 3.20)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (DEFINED ENV{ESP_IDF_VERSION})
file(GLOB_RECURSE SOURCE_FILES Source/*.c*)
list(APPEND REQUIRES_LIST
TactilityCore
lvgl
driver
elf_loader
lv_screenshot
QRCode
esp_http_server
esp_http_client
esp_lvgl_port
esp_wifi
minitar
minmea
nvs_flash
spiffs
vfs
fatfs
lwip
)
if ("${IDF_TARGET}" STREQUAL "esp32s3")
list(APPEND REQUIRES_LIST esp_tinyusb)
endif ()
idf_component_register(
SRCS ${SOURCE_FILES}
INCLUDE_DIRS "Include/"
PRIV_INCLUDE_DIRS "Private/"
REQUIRES ${REQUIRES_LIST}
)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(${COMPONENT_LIB} PUBLIC -Wno-unused-variable)
endif ()
if (NOT DEFINED TACTILITY_SKIP_SPIFFS)
# Read-only
fatfs_create_rawflash_image(system "${CMAKE_CURRENT_SOURCE_DIR}/../Data/system" FLASH_IN_PROJECT PRESERVE_TIME)
# Read-write
fatfs_create_spiflash_image(data "${CMAKE_CURRENT_SOURCE_DIR}/../Data/data" FLASH_IN_PROJECT PRESERVE_TIME)
endif ()
else()
file(GLOB_RECURSE SOURCES "Source/*.c*")
add_library(Tactility OBJECT)
target_sources(Tactility
PRIVATE ${SOURCES}
)
include_directories(
PRIVATE Private/
)
target_include_directories(Tactility
PUBLIC Include/
)
add_definitions(-D_Nullable=)
add_definitions(-D_Nonnull=)
target_link_libraries(Tactility
PUBLIC TactilityCore
PUBLIC freertos_kernel
PUBLIC lvgl
PUBLIC lv_screenshot
PUBLIC minmea
PUBLIC minitar
)
endif()