* improvements for cross-platform compiling * moved tactility-core to libs/ * splitup improvements * remove git/gitmodules from freertos * better platformbetter platform checks * added build scripts * delete mbedtls * re-add mbedtls * fixes and improvements * added pc build * simplify build scripts * revert build scrpit * updated builds * fix for pc * fix for pc * fix for build
37 lines
842 B
CMake
37 lines
842 B
CMake
cmake_minimum_required(VERSION 3.16)
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
file(GLOB SOURCES "src/*.c")
|
|
file(GLOB HEADERS "src/*.h")
|
|
|
|
add_library(tactility-core OBJECT)
|
|
target_sources(tactility-core
|
|
PRIVATE ${SOURCES}
|
|
PUBLIC ${HEADERS}
|
|
)
|
|
target_include_directories(tactility-core
|
|
PRIVATE src/
|
|
INTERFACE src/
|
|
)
|
|
|
|
if (DEFINED ENV{ESP_IDF_VERSION})
|
|
add_definitions(-DESP_PLATFORM)
|
|
target_link_libraries(tactility-core
|
|
PUBLIC mlib
|
|
PUBLIC idf::freertos
|
|
PRIVATE idf::mbedtls
|
|
PRIVATE idf::nvs_flash
|
|
PRIVATE idf::esp_hw_support
|
|
)
|
|
else()
|
|
add_definitions(-D_Nullable=)
|
|
add_definitions(-D_Nonnull=)
|
|
target_link_libraries(tactility-core
|
|
PRIVATE mlib
|
|
PRIVATE mbedtls
|
|
PRIVATE freertos-kernel
|
|
)
|
|
endif()
|