I guess I used setup for esp32 that was somehow forced with setup.
I am getting different errors now from CMake - seems like something is not set right in CMake files or code.
After tweaking toolchain-esp8266.cmake file I get to the point where generating build output dirs fails.
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/dev/Documents/Esp8266/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc.exe
-- The C compiler identification is GNU 5.2.0
-- The CXX compiler identification is GNU 5.2.0
-- Check for working C compiler: C:/Users/dev/Documents/Esp8266/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc.exe
-- Check for working C compiler: C:/Users/dev/Documents/Esp8266/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Users/dev/Documents/Esp8266/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++.exe
-- Check for working CXX compiler: C:/Users/dev/Documents/Esp8266/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at C:/Users/dev/Documents/Esp8266/esp-idf/tools/cmake/project.cmake:118 (add_subdirectory):
add_subdirectory given source "cjson" which is not an existing directory.
Call Stack (most recent call first):
CMakeLists.txt:8 (project)
CMake Error at C:/Users/dev/Documents/Esp8266/esp-idf/tools/cmake/project.cmake:118 (add_subdirectory):
add_subdirectory given source "coap" which is not an existing directory.
Call Stack (most recent call first):
CMakeLists.txt:8 (project)
--------
Most of subdirs fail - 'existing directory' error
These lines fail:
~~~
# Add each component to the build as a library
#
foreach(COMPONENT_PATH ${BUILD_COMPONENT_PATHS})
get_filename_component(COMPONENT_NAME ${COMPONENT_PATH} NAME)
add_subdirectory(${COMPONENT_PATH} ${COMPONENT_NAME})
endforeach()
~~~
I would appreciate help