From a63fe0d97ac8dbc7be76d681e94cda6417d2c4a7 Mon Sep 17 00:00:00 2001 From: Francisco Herrera Date: Wed, 10 Jul 2024 20:55:17 -0300 Subject: [PATCH 1/5] trying to fix building on esp-idf --- CMakeLists.txt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4c5dd31..fa61485d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,16 +1,22 @@ cmake_minimum_required(VERSION 3.5) -project(u8g2) set(COMPONENT_ADD_INCLUDEDIRS csrc) file(GLOB COMPONENT_SRCS csrc/*.c) file(GLOB COMPONENT_HDRS csrc/*.h) +if(COMMAND idf_component_register) + idf_component_register(SRCS "${COMPONENT_SRCS}" INCLUDE_DIRS csrc) + return() +endif() + +project(u8g2) + if(COMMAND register_component) - set(COMPONENT_NAME ".") - register_component() + set(COMPONENT_NAME ".") + register_component() else() - add_library(u8g2 ${COMPONENT_SRCS}) - target_include_directories(u8g2 PUBLIC "$" "$") + add_library(u8g2 ${COMPONENT_SRCS}) + target_include_directories(u8g2 PUBLIC "$" "$") endif() install(TARGETS u8g2 From 212651e74fbeaac0523d407d8ee58bd2c0681767 Mon Sep 17 00:00:00 2001 From: Francisco Herrera Date: Wed, 10 Jul 2024 21:18:02 -0300 Subject: [PATCH 2/5] formatting --- CMakeLists.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa61485d..44e39a33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,29 +5,29 @@ file(GLOB COMPONENT_SRCS csrc/*.c) file(GLOB COMPONENT_HDRS csrc/*.h) if(COMMAND idf_component_register) - idf_component_register(SRCS "${COMPONENT_SRCS}" INCLUDE_DIRS csrc) - return() + idf_component_register(SRCS "${COMPONENT_SRCS}" INCLUDE_DIRS csrc) + return() endif() project(u8g2) if(COMMAND register_component) - set(COMPONENT_NAME ".") - register_component() + set(COMPONENT_NAME ".") + register_component() else() - add_library(u8g2 ${COMPONENT_SRCS}) - target_include_directories(u8g2 PUBLIC "$" "$") + add_library(u8g2 ${COMPONENT_SRCS}) + target_include_directories(u8g2 PUBLIC "$" "$") endif() install(TARGETS u8g2 - EXPORT u8g2-targets - ARCHIVE DESTINATION lib) + EXPORT u8g2-targets + ARCHIVE DESTINATION lib) install(FILES ${COMPONENT_HDRS} - DESTINATION include/u8g2) + DESTINATION include/u8g2) install(EXPORT u8g2-targets - DESTINATION lib/cmake/u8g2) + DESTINATION lib/cmake/u8g2) install(FILES ${u8g2_SOURCE_DIR}/pkg/u8g2-config.cmake - DESTINATION lib/cmake/u8g2) + DESTINATION lib/cmake/u8g2) From 4c5b6b1319316409c560f04f92b4df9e8707d401 Mon Sep 17 00:00:00 2001 From: Francisco Herrera Date: Wed, 10 Jul 2024 22:19:01 -0300 Subject: [PATCH 3/5] Revert "formatting" This reverts commit 212651e74fbeaac0523d407d8ee58bd2c0681767. --- CMakeLists.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 44e39a33..fa61485d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,29 +5,29 @@ file(GLOB COMPONENT_SRCS csrc/*.c) file(GLOB COMPONENT_HDRS csrc/*.h) if(COMMAND idf_component_register) - idf_component_register(SRCS "${COMPONENT_SRCS}" INCLUDE_DIRS csrc) - return() + idf_component_register(SRCS "${COMPONENT_SRCS}" INCLUDE_DIRS csrc) + return() endif() project(u8g2) if(COMMAND register_component) - set(COMPONENT_NAME ".") - register_component() + set(COMPONENT_NAME ".") + register_component() else() - add_library(u8g2 ${COMPONENT_SRCS}) - target_include_directories(u8g2 PUBLIC "$" "$") + add_library(u8g2 ${COMPONENT_SRCS}) + target_include_directories(u8g2 PUBLIC "$" "$") endif() install(TARGETS u8g2 - EXPORT u8g2-targets - ARCHIVE DESTINATION lib) + EXPORT u8g2-targets + ARCHIVE DESTINATION lib) install(FILES ${COMPONENT_HDRS} - DESTINATION include/u8g2) + DESTINATION include/u8g2) install(EXPORT u8g2-targets - DESTINATION lib/cmake/u8g2) + DESTINATION lib/cmake/u8g2) install(FILES ${u8g2_SOURCE_DIR}/pkg/u8g2-config.cmake - DESTINATION lib/cmake/u8g2) + DESTINATION lib/cmake/u8g2) From 6ccc10a881cc8929b73879f75d5be3c0c215ce9f Mon Sep 17 00:00:00 2001 From: Francisco Herrera Date: Wed, 10 Jul 2024 22:20:42 -0300 Subject: [PATCH 4/5] Revert "Revert "formatting"" This reverts commit 4c5b6b1319316409c560f04f92b4df9e8707d401. --- CMakeLists.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa61485d..44e39a33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,29 +5,29 @@ file(GLOB COMPONENT_SRCS csrc/*.c) file(GLOB COMPONENT_HDRS csrc/*.h) if(COMMAND idf_component_register) - idf_component_register(SRCS "${COMPONENT_SRCS}" INCLUDE_DIRS csrc) - return() + idf_component_register(SRCS "${COMPONENT_SRCS}" INCLUDE_DIRS csrc) + return() endif() project(u8g2) if(COMMAND register_component) - set(COMPONENT_NAME ".") - register_component() + set(COMPONENT_NAME ".") + register_component() else() - add_library(u8g2 ${COMPONENT_SRCS}) - target_include_directories(u8g2 PUBLIC "$" "$") + add_library(u8g2 ${COMPONENT_SRCS}) + target_include_directories(u8g2 PUBLIC "$" "$") endif() install(TARGETS u8g2 - EXPORT u8g2-targets - ARCHIVE DESTINATION lib) + EXPORT u8g2-targets + ARCHIVE DESTINATION lib) install(FILES ${COMPONENT_HDRS} - DESTINATION include/u8g2) + DESTINATION include/u8g2) install(EXPORT u8g2-targets - DESTINATION lib/cmake/u8g2) + DESTINATION lib/cmake/u8g2) install(FILES ${u8g2_SOURCE_DIR}/pkg/u8g2-config.cmake - DESTINATION lib/cmake/u8g2) + DESTINATION lib/cmake/u8g2) From 515e591826911a0b5daa30b89ebc50459aa3ef28 Mon Sep 17 00:00:00 2001 From: Francisco Date: Wed, 10 Jul 2024 22:24:11 -0300 Subject: [PATCH 5/5] original formatting --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 44e39a33..c995fcbb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,14 +20,14 @@ else() endif() install(TARGETS u8g2 - EXPORT u8g2-targets - ARCHIVE DESTINATION lib) + EXPORT u8g2-targets + ARCHIVE DESTINATION lib) install(FILES ${COMPONENT_HDRS} - DESTINATION include/u8g2) + DESTINATION include/u8g2) install(EXPORT u8g2-targets - DESTINATION lib/cmake/u8g2) + DESTINATION lib/cmake/u8g2) install(FILES ${u8g2_SOURCE_DIR}/pkg/u8g2-config.cmake - DESTINATION lib/cmake/u8g2) + DESTINATION lib/cmake/u8g2)