From 6550fa458321c952a8c7e60c5096609d3fbf32f9 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Wed, 17 Jan 2024 21:45:57 +0100 Subject: [PATCH] move mlib to libs folder --- CMakeLists.txt | 2 ++ components/mlib/CMakeLists.txt | 3 --- components/tactility-core/CMakeLists.txt | 5 ++++- components/tactility/CMakeLists.txt | 2 +- libs/mlib/CMakeLists.txt | 4 ++++ {components => libs}/mlib/LICENSE | 0 {components => libs}/mlib/README.md | 0 {components => libs}/mlib/m-algo.h | 0 {components => libs}/mlib/m-array.h | 0 {components => libs}/mlib/m-atomic.h | 0 {components => libs}/mlib/m-bitset.h | 0 {components => libs}/mlib/m-bptree.h | 0 {components => libs}/mlib/m-buffer.h | 0 {components => libs}/mlib/m-c-mempool.h | 0 {components => libs}/mlib/m-concurrent.h | 0 {components => libs}/mlib/m-core.h | 0 {components => libs}/mlib/m-deque.h | 0 {components => libs}/mlib/m-dict.h | 0 {components => libs}/mlib/m-funcobj.h | 0 {components => libs}/mlib/m-genint.h | 0 {components => libs}/mlib/m-i-list.h | 0 {components => libs}/mlib/m-i-shared.h | 0 {components => libs}/mlib/m-list.h | 0 {components => libs}/mlib/m-mempool.h | 0 {components => libs}/mlib/m-mutex.h | 0 {components => libs}/mlib/m-prioqueue.h | 0 {components => libs}/mlib/m-rbtree.h | 0 {components => libs}/mlib/m-serial-bin.h | 0 {components => libs}/mlib/m-serial-json.h | 0 {components => libs}/mlib/m-shared.h | 0 {components => libs}/mlib/m-snapshot.h | 0 {components => libs}/mlib/m-string.h | 0 {components => libs}/mlib/m-thread.h | 0 {components => libs}/mlib/m-tree.h | 0 {components => libs}/mlib/m-try.h | 0 {components => libs}/mlib/m-tuple.h | 0 {components => libs}/mlib/m-variant.h | 0 {components => libs}/mlib/m-worker.h | 0 main/CMakeLists.txt | 1 + 39 files changed, 12 insertions(+), 5 deletions(-) delete mode 100644 components/mlib/CMakeLists.txt create mode 100644 libs/mlib/CMakeLists.txt rename {components => libs}/mlib/LICENSE (100%) rename {components => libs}/mlib/README.md (100%) rename {components => libs}/mlib/m-algo.h (100%) rename {components => libs}/mlib/m-array.h (100%) rename {components => libs}/mlib/m-atomic.h (100%) rename {components => libs}/mlib/m-bitset.h (100%) rename {components => libs}/mlib/m-bptree.h (100%) rename {components => libs}/mlib/m-buffer.h (100%) rename {components => libs}/mlib/m-c-mempool.h (100%) rename {components => libs}/mlib/m-concurrent.h (100%) rename {components => libs}/mlib/m-core.h (100%) rename {components => libs}/mlib/m-deque.h (100%) rename {components => libs}/mlib/m-dict.h (100%) rename {components => libs}/mlib/m-funcobj.h (100%) rename {components => libs}/mlib/m-genint.h (100%) rename {components => libs}/mlib/m-i-list.h (100%) rename {components => libs}/mlib/m-i-shared.h (100%) rename {components => libs}/mlib/m-list.h (100%) rename {components => libs}/mlib/m-mempool.h (100%) rename {components => libs}/mlib/m-mutex.h (100%) rename {components => libs}/mlib/m-prioqueue.h (100%) rename {components => libs}/mlib/m-rbtree.h (100%) rename {components => libs}/mlib/m-serial-bin.h (100%) rename {components => libs}/mlib/m-serial-json.h (100%) rename {components => libs}/mlib/m-shared.h (100%) rename {components => libs}/mlib/m-snapshot.h (100%) rename {components => libs}/mlib/m-string.h (100%) rename {components => libs}/mlib/m-thread.h (100%) rename {components => libs}/mlib/m-tree.h (100%) rename {components => libs}/mlib/m-try.h (100%) rename {components => libs}/mlib/m-tuple.h (100%) rename {components => libs}/mlib/m-variant.h (100%) rename {components => libs}/mlib/m-worker.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index be3675cf..ad9faf8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,3 +17,5 @@ endif() include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(Tactility) + +add_subdirectory(libs/mlib) diff --git a/components/mlib/CMakeLists.txt b/components/mlib/CMakeLists.txt deleted file mode 100644 index 16472f46..00000000 --- a/components/mlib/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -idf_component_register( - INCLUDE_DIRS "." -) diff --git a/components/tactility-core/CMakeLists.txt b/components/tactility-core/CMakeLists.txt index 95f629ed..e4009dfc 100644 --- a/components/tactility-core/CMakeLists.txt +++ b/components/tactility-core/CMakeLists.txt @@ -1,5 +1,8 @@ idf_component_register( SRC_DIRS "src" INCLUDE_DIRS "src" - REQUIRES mlib mbedtls esp_hw_support nvs_flash + REQUIRES mbedtls esp_hw_support nvs_flash ) + +target_link_libraries(${COMPONENT_LIB} ${IDF_TARGET_NAME} mlib) + diff --git a/components/tactility/CMakeLists.txt b/components/tactility/CMakeLists.txt index 2dbb9fa2..43242c4f 100644 --- a/components/tactility/CMakeLists.txt +++ b/components/tactility/CMakeLists.txt @@ -20,7 +20,6 @@ idf_component_register( driver fatfs tactility-core - mlib nvs_flash spiffs ) @@ -30,3 +29,4 @@ spiffs_create_partition_image(assets ${ASSETS_SRC_DIR} FLASH_IN_PROJECT) set(CONFIG_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/config") spiffs_create_partition_image(config ${CONFIG_SRC_DIR} FLASH_IN_PROJECT) + diff --git a/libs/mlib/CMakeLists.txt b/libs/mlib/CMakeLists.txt new file mode 100644 index 00000000..3b17cd27 --- /dev/null +++ b/libs/mlib/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.16) +add_library(mlib INTERFACE "") # No sources +target_include_directories(mlib INTERFACE .) + diff --git a/components/mlib/LICENSE b/libs/mlib/LICENSE similarity index 100% rename from components/mlib/LICENSE rename to libs/mlib/LICENSE diff --git a/components/mlib/README.md b/libs/mlib/README.md similarity index 100% rename from components/mlib/README.md rename to libs/mlib/README.md diff --git a/components/mlib/m-algo.h b/libs/mlib/m-algo.h similarity index 100% rename from components/mlib/m-algo.h rename to libs/mlib/m-algo.h diff --git a/components/mlib/m-array.h b/libs/mlib/m-array.h similarity index 100% rename from components/mlib/m-array.h rename to libs/mlib/m-array.h diff --git a/components/mlib/m-atomic.h b/libs/mlib/m-atomic.h similarity index 100% rename from components/mlib/m-atomic.h rename to libs/mlib/m-atomic.h diff --git a/components/mlib/m-bitset.h b/libs/mlib/m-bitset.h similarity index 100% rename from components/mlib/m-bitset.h rename to libs/mlib/m-bitset.h diff --git a/components/mlib/m-bptree.h b/libs/mlib/m-bptree.h similarity index 100% rename from components/mlib/m-bptree.h rename to libs/mlib/m-bptree.h diff --git a/components/mlib/m-buffer.h b/libs/mlib/m-buffer.h similarity index 100% rename from components/mlib/m-buffer.h rename to libs/mlib/m-buffer.h diff --git a/components/mlib/m-c-mempool.h b/libs/mlib/m-c-mempool.h similarity index 100% rename from components/mlib/m-c-mempool.h rename to libs/mlib/m-c-mempool.h diff --git a/components/mlib/m-concurrent.h b/libs/mlib/m-concurrent.h similarity index 100% rename from components/mlib/m-concurrent.h rename to libs/mlib/m-concurrent.h diff --git a/components/mlib/m-core.h b/libs/mlib/m-core.h similarity index 100% rename from components/mlib/m-core.h rename to libs/mlib/m-core.h diff --git a/components/mlib/m-deque.h b/libs/mlib/m-deque.h similarity index 100% rename from components/mlib/m-deque.h rename to libs/mlib/m-deque.h diff --git a/components/mlib/m-dict.h b/libs/mlib/m-dict.h similarity index 100% rename from components/mlib/m-dict.h rename to libs/mlib/m-dict.h diff --git a/components/mlib/m-funcobj.h b/libs/mlib/m-funcobj.h similarity index 100% rename from components/mlib/m-funcobj.h rename to libs/mlib/m-funcobj.h diff --git a/components/mlib/m-genint.h b/libs/mlib/m-genint.h similarity index 100% rename from components/mlib/m-genint.h rename to libs/mlib/m-genint.h diff --git a/components/mlib/m-i-list.h b/libs/mlib/m-i-list.h similarity index 100% rename from components/mlib/m-i-list.h rename to libs/mlib/m-i-list.h diff --git a/components/mlib/m-i-shared.h b/libs/mlib/m-i-shared.h similarity index 100% rename from components/mlib/m-i-shared.h rename to libs/mlib/m-i-shared.h diff --git a/components/mlib/m-list.h b/libs/mlib/m-list.h similarity index 100% rename from components/mlib/m-list.h rename to libs/mlib/m-list.h diff --git a/components/mlib/m-mempool.h b/libs/mlib/m-mempool.h similarity index 100% rename from components/mlib/m-mempool.h rename to libs/mlib/m-mempool.h diff --git a/components/mlib/m-mutex.h b/libs/mlib/m-mutex.h similarity index 100% rename from components/mlib/m-mutex.h rename to libs/mlib/m-mutex.h diff --git a/components/mlib/m-prioqueue.h b/libs/mlib/m-prioqueue.h similarity index 100% rename from components/mlib/m-prioqueue.h rename to libs/mlib/m-prioqueue.h diff --git a/components/mlib/m-rbtree.h b/libs/mlib/m-rbtree.h similarity index 100% rename from components/mlib/m-rbtree.h rename to libs/mlib/m-rbtree.h diff --git a/components/mlib/m-serial-bin.h b/libs/mlib/m-serial-bin.h similarity index 100% rename from components/mlib/m-serial-bin.h rename to libs/mlib/m-serial-bin.h diff --git a/components/mlib/m-serial-json.h b/libs/mlib/m-serial-json.h similarity index 100% rename from components/mlib/m-serial-json.h rename to libs/mlib/m-serial-json.h diff --git a/components/mlib/m-shared.h b/libs/mlib/m-shared.h similarity index 100% rename from components/mlib/m-shared.h rename to libs/mlib/m-shared.h diff --git a/components/mlib/m-snapshot.h b/libs/mlib/m-snapshot.h similarity index 100% rename from components/mlib/m-snapshot.h rename to libs/mlib/m-snapshot.h diff --git a/components/mlib/m-string.h b/libs/mlib/m-string.h similarity index 100% rename from components/mlib/m-string.h rename to libs/mlib/m-string.h diff --git a/components/mlib/m-thread.h b/libs/mlib/m-thread.h similarity index 100% rename from components/mlib/m-thread.h rename to libs/mlib/m-thread.h diff --git a/components/mlib/m-tree.h b/libs/mlib/m-tree.h similarity index 100% rename from components/mlib/m-tree.h rename to libs/mlib/m-tree.h diff --git a/components/mlib/m-try.h b/libs/mlib/m-try.h similarity index 100% rename from components/mlib/m-try.h rename to libs/mlib/m-try.h diff --git a/components/mlib/m-tuple.h b/libs/mlib/m-tuple.h similarity index 100% rename from components/mlib/m-tuple.h rename to libs/mlib/m-tuple.h diff --git a/components/mlib/m-variant.h b/libs/mlib/m-variant.h similarity index 100% rename from components/mlib/m-variant.h rename to libs/mlib/m-variant.h diff --git a/components/mlib/m-worker.h b/libs/mlib/m-worker.h similarity index 100% rename from components/mlib/m-worker.h rename to libs/mlib/m-worker.h diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 9f67f2a1..55cca6db 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -14,3 +14,4 @@ idf_component_register( "src/hello_world" REQUIRES ${project_components} ) +