PlatformIO Community

Not sure why I can't #include without editing include header location

Hmmm…using esp idf 4 and added components to the cmakelists.txt for the cpp_utils component, but it is still making me add the relative location:

#include <…/bt/host/bluedroid/api/include/api/esp_gatts_api.h>

I am using the CMakeLists.txt that came with cpp_utils

# Edit following two lines to set component requirements (see docs)
set(COMPONENT_REQUIRES
  "console"
  "fatfs"
  "json"
  "mdns"
  "nvs_flash"
)
set(COMPONENT_PRIV_REQUIRES )

file(GLOB COMPONENT_SRCS
  LIST_DIRECTORIES false
  "*.h"
  "*.cpp"
  "*.c"
  "*.S"
)
set(COMPONENT_ADD_INCLUDEDIRS ".")

register_component()

Top Level CMakeLists.txt

cmake_minimum_required(VERSION 3.16.0)

list(APPEND EXTRA_COMPONENT_DIRS "components/esp-aws-iot")

include($ENV{IDF_PATH}/tools/cmake/project.cmake)

project(connect-esp32

         LANGUAGES C CXX)

This project seems rather complex.

Sure the repo is written against ESP-IDF v4.0, which is what PIO uses?

I only see one component folder being added here and not specific compoents for cpp_utils and others?

Can you upload the whole project for inspection?

hahaha is it? Seems simple to me, but having such problems right now moving to cmake.
I am just trying to use the cpp_utils library, esp_aws_iot, and my customLIbrary and having to go into the library and edit the include files to find a relative path. That seems strange…

I was given advice and thought I read somewhere not to include cpp_utils since the components folder was already added?

uploading the full project isn’t an option. What else can i Provide to give you a better understanding of my layout?

@maxgerhardt here is a similar project, simple, but still cannot just compile it… strange.
how do i upload…