I have a legacy GNU makefile build and now need to migrate to CMake (ESP-IDF 4.1 legacy build seems C++11 broken).
I have not found a simple legacy GNU to CMake 'translation' tutorial.
The problem is that the examples are single instance e.g. examples show single extra directory:
Code: Select all
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
Code: Select all
EXTRA_COMPONENT_DIRS += $(PROJECT_PATH)/components/WebApp/image
EXTRA_COMPONENT_DIRS += $(PROJECT_PATH)/components/NMEA/Application
The makefile commands I need to translate are (above)+:
Add a pre-built library:
Code: Select all
# The following three lines link in the pre-built NMEA library.
LIBS := nmea
COMPONENT_ADD_LDFLAGS += -L$(COMPONENT_PATH)/lib \
$(addprefix -l,$(LIBS))
Add multiple include paths
Code: Select all
COMPONENT_PRIV_INCLUDEDIRS := include ../../../database/include ../../../third-party/include