Support for building and running external apps (#112)
This commit is contained in:
committed by
GitHub
parent
42e843b463
commit
415442e410
@@ -3,31 +3,35 @@ cmake_minimum_required(VERSION 3.16)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
file(GLOB_RECURSE SOURCES "Source/*.c*")
|
||||
file(GLOB_RECURSE HEADERS "Source/*.h*")
|
||||
|
||||
add_library(TactilityCore OBJECT)
|
||||
|
||||
target_sources(TactilityCore
|
||||
PRIVATE ${SOURCES}
|
||||
PUBLIC ${HEADERS}
|
||||
)
|
||||
|
||||
target_include_directories(TactilityCore SYSTEM
|
||||
PUBLIC Source/
|
||||
)
|
||||
|
||||
if (DEFINED ENV{ESP_IDF_VERSION})
|
||||
add_definitions(-DESP_PLATFORM)
|
||||
target_link_libraries(TactilityCore
|
||||
PUBLIC idf::mbedtls
|
||||
PRIVATE idf::nvs_flash # ESP-IDF // for secure.c
|
||||
file(GLOB_RECURSE SOURCE_FILES Source/*.c*)
|
||||
|
||||
idf_component_register(
|
||||
SRCS ${SOURCE_FILES}
|
||||
INCLUDE_DIRS "Source/"
|
||||
REQUIRES mbedtls nvs_flash
|
||||
)
|
||||
|
||||
add_definitions(-DESP_PLATFORM)
|
||||
else()
|
||||
file(GLOB_RECURSE SOURCES "Source/*.c*")
|
||||
file(GLOB_RECURSE HEADERS "Source/*.h*")
|
||||
|
||||
add_library(TactilityCore OBJECT)
|
||||
|
||||
target_sources(TactilityCore
|
||||
PRIVATE ${SOURCES}
|
||||
PUBLIC ${HEADERS}
|
||||
)
|
||||
|
||||
target_include_directories(TactilityCore SYSTEM
|
||||
PUBLIC Source/
|
||||
)
|
||||
|
||||
add_definitions(-D_Nullable=)
|
||||
add_definitions(-D_Nonnull=)
|
||||
target_link_libraries(TactilityCore
|
||||
PUBLIC mbedtls
|
||||
PUBLIC freertos_kernel
|
||||
PUBLIC mbedtls
|
||||
PUBLIC freertos_kernel
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
Reference in New Issue
Block a user